@Before public void prepare() throws IOException { tester = BatchMediumTester.builder() .bootstrapProperties( ImmutableMap.of( CoreProperties.ANALYSIS_MODE, CoreProperties.ANALYSIS_MODE_ISSUES, CoreProperties.GLOBAL_WORKING_DIRECTORY, temp.newFolder().getAbsolutePath())) .registerPlugin("xoo", new XooPlugin()) .addQProfile("xoo", "Sonar Way") .addRules(new XooRulesDefinition()) .addRule("manual:MyManualIssue", "manual", "MyManualIssue", "My manual issue") .addRule("manual:MyManualIssueDup", "manual", "MyManualIssue", "My manual issue") .addActiveRule( "xoo", "OneIssuePerLine", null, "One issue per line", "MAJOR", null, "xoo") .addActiveRule( "xoo", "OneIssueOnDirPerFile", null, "OneIssueOnDirPerFile", "MAJOR", null, "xoo") .addActiveRule( "xoo", "OneIssuePerModule", null, "OneIssuePerModule", "MAJOR", null, "xoo") .addActiveRule("manual", "MyManualIssue", null, "My manual issue", "MAJOR", null, null) .setAssociated(false) .build(); tester.start(); }
@Before public void prepare() throws IOException { tester.start(); baseDir = temp.newFolder(); builder = ImmutableMap.<String, String>builder() .put("sonar.task", "scan") .put("sonar.projectBaseDir", baseDir.getAbsolutePath()) .put("sonar.projectKey", "com.foo.project") .put("sonar.projectName", "Foo Project") .put("sonar.projectVersion", "1.0-SNAPSHOT") .put("sonar.projectDescription", "Description of Foo Project"); }
@Before public void prepare() { tester.start(); }