Package org.sonar.squid.recognizer

Examples of org.sonar.squid.recognizer.EndWithDetector


   * {@inheritDoc}
   */
  public Set<Detector> getDetectors() {
    final Set<Detector> detectors = new HashSet<Detector>();

    detectors.add(new EndWithDetector(0.95, '}', ';', '{'));
    detectors.add(new KeywordsDetector(0.7, "||", "&&"));
    detectors.add(new KeywordsDetector(0.95, "#define", "#endif", "#ifdef", "#ifndef", "#include"));
    detectors.add(new KeywordsDetector(0.3, "auto", "class", "do", "double", "float", "for", "int", "long", "mutable", "namespace",
        "operator", "private", "protected", "public", "return", "sizeof", "short", "static", "struct", "template", "throw", "typedef",
        "typename", "union", "void", "while"));
View Full Code Here


  private static class CxxRecognizer implements LanguageFootprint {

    public Set<Detector> getDetectors() {
      Set<Detector> detectors = Sets.newHashSet();

      detectors.add(new EndWithDetector(0.95, '}', ';', '{'));
      detectors.add(new KeywordsDetector(0.7, "||", "&&"));
      detectors.add(new KeywordsDetector(0.3, CppKeyword.keywordValues()));
      detectors.add(new ContainsDetector(0.95, "for(", "if(", "while(", "catch(", "switch(", "try{", "else{"));

      return detectors;
View Full Code Here

TOP

Related Classes of org.sonar.squid.recognizer.EndWithDetector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.