Search in sources :

Example 1 with NoSonarScanner

use of org.sonar.plugins.web.visitor.NoSonarScanner in project sonar-web by SonarSource.

the class WebSensor method setupScanner.

/**
 * Create PageScanner with Visitors.
 */
private HtmlAstScanner setupScanner(SensorContext context) {
    HtmlAstScanner scanner = new HtmlAstScanner(ImmutableList.of(new WebTokensVisitor(context), new PageCountLines(), new ComplexityVisitor(), new NoSonarScanner(noSonarFilter)));
    for (Object check : checks.all()) {
        ((AbstractPageCheck) check).setRuleKey(checks.ruleKey(check));
        scanner.addVisitor((AbstractPageCheck) check);
    }
    return scanner;
}
Also used : ComplexityVisitor(org.sonar.plugins.web.analyzers.ComplexityVisitor) PageCountLines(org.sonar.plugins.web.analyzers.PageCountLines) NoSonarScanner(org.sonar.plugins.web.visitor.NoSonarScanner) AbstractPageCheck(org.sonar.plugins.web.checks.AbstractPageCheck) HtmlAstScanner(org.sonar.plugins.web.visitor.HtmlAstScanner)

Aggregations

ComplexityVisitor (org.sonar.plugins.web.analyzers.ComplexityVisitor)1 PageCountLines (org.sonar.plugins.web.analyzers.PageCountLines)1 AbstractPageCheck (org.sonar.plugins.web.checks.AbstractPageCheck)1 HtmlAstScanner (org.sonar.plugins.web.visitor.HtmlAstScanner)1 NoSonarScanner (org.sonar.plugins.web.visitor.NoSonarScanner)1