if (sonarComponents != null) { if(!sonarComponents.isSonarLintContext()) { codeVisitors = Iterables.concat(codeVisitors, Arrays.asList(new FileLinesVisitor(sonarComponents), new SyntaxHighlighterVisitor(sonarComponents))); testCodeVisitors.add(new SyntaxHighlighterVisitor(sonarComponents));
if (sonarComponents != null) { if(!sonarComponents.isSonarLintContext()) { codeVisitors = Iterables.concat(codeVisitors, Arrays.asList(new FileLinesVisitor(sonarComponents), new SyntaxHighlighterVisitor(sonarComponents))); testCodeVisitors.add(new SyntaxHighlighterVisitor(sonarComponents));
Arrays.asList( new FileLinesVisitor(sonarComponents, conf.getCharset()), new SyntaxHighlighterVisitor(sonarComponents, conf.getCharset()) testCodeVisitors.add(new SyntaxHighlighterVisitor(sonarComponents, conf.getCharset())); classpath = sonarComponents.getJavaClasspath(); testClasspath = sonarComponents.getJavaTestClasspath();
private void setupAstScanner(AstScanner astScanner, Iterable<CodeVisitor> visitorsToBridge, List<File> classpath, JavaConfiguration conf, @Nullable SonarComponents sonarComponents) { if(sonarComponents != null) { astScanner.accept(new FileLinesVisitor(sonarComponents, conf.getCharset())); astScanner.accept(new SyntaxHighlighterVisitor(sonarComponents, conf.getCharset())); } VisitorsBridge visitorsBridgeTest = new VisitorsBridge(visitorsToBridge, classpath, sonarComponents); visitorsBridgeTest.setCharset(conf.getCharset()); visitorsBridgeTest.setAnalyseAccessors(conf.separatesAccessorsFromMethods()); astScanner.accept(visitorsBridgeTest); }