Examples of EndWithDetector


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

Examples of org.sonar.squid.recognizer.EndWithDetector

  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

Examples of org.sonar.squidbridge.recognizer.EndWithDetector

  private static class JavaScriptRecognizer implements LanguageFootprint {

    public Set<Detector> getDetectors() {
      return ImmutableSet.of(
          new EndWithDetector(0.95, '}', ';', '{'),
          new KeywordsDetector(0.3, EcmaScriptKeyword.keywordValues()),
          new ContainsDetector(0.95, "*=", "/=", "%=", "+=", "-=", "<<=", ">>=", ">>>=", "&=", "^=", "|="),
          new ContainsDetector(0.95, "!=", "!=="));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.