Search in sources :

Example 61 with TaskResult

use of org.sonar.scanner.mediumtest.TaskResult in project sonarqube by SonarSource.

the class ScanOnlyChangedTest method testScanAll.

@Test
public void testScanAll() throws Exception {
    File projectDir = copyProject("/mediumtest/xoo/sample");
    TaskResult result = tester.newScanTask(new File(projectDir, "sonar-project.properties")).property("sonar.scanAllFiles", "true").start();
    assertNumberIssues(result, 16, 2, 0);
    /*
     * 8 new per line
     */
    assertNumberIssuesOnFile(result, "HelloJava.xoo", 8);
}
Also used : TaskResult(org.sonar.scanner.mediumtest.TaskResult) File(java.io.File) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)61 TaskResult (org.sonar.scanner.mediumtest.TaskResult)61 File (java.io.File)59 InputFile (org.sonar.api.batch.fs.InputFile)31 DefaultInputFile (org.sonar.api.batch.fs.internal.DefaultInputFile)21 List (java.util.List)8 Issue (org.sonar.scanner.protocol.output.ScannerReport.Issue)7 ScannerReport (org.sonar.scanner.protocol.output.ScannerReport)6 Path (java.nio.file.Path)3 InputDir (org.sonar.api.batch.fs.InputDir)3 ScannerMediumTester (org.sonar.scanner.mediumtest.ScannerMediumTester)3 XooPlugin (org.sonar.xoo.XooPlugin)3 XooRulesDefinition (org.sonar.xoo.rule.XooRulesDefinition)3 TrackedIssue (org.sonar.scanner.issue.tracking.TrackedIssue)2 Date (java.util.Date)1 LogOutputRecorder (org.sonar.scanner.mediumtest.LogOutputRecorder)1