@Test public void import_golandci_lint_issues() throws IOException { List<ExternalIssue> externalIssues = importIssues("golandci-lint-report.xml"); assertThat(externalIssues).hasSize(1); ExternalIssue first = externalIssues.get(0); assertThat(first.primaryLocation().inputComponent().key()).isEqualTo("externalreport-project:TabCharacter.go"); assertThat(first.ruleKey().rule()).isEqualTo("deadcode"); assertThat(first.type()).isEqualTo(RuleType.BUG); assertThat(first.severity()).isEqualTo(Severity.MAJOR); assertThat(first.primaryLocation().message()).isEqualTo("`three` is unused"); assertThat(first.primaryLocation().textRange().start().line()).isEqualTo(4); assertThat(logTester.logs(LoggerLevel.ERROR)).isEmpty(); }
protected Severity severity(String ruleKey, @Nullable String severity) { return "info".equals(severity) ? Severity.MINOR : Severity.MAJOR; }
CheckstyleFormatImporter { protected Severity severity(String ruleKey, @Nullable String severity) { return "info".equals(severity) ? Severity.MINOR : Severity.MAJOR; } }
CheckstyleFormatImporter { protected Severity severity(String ruleKey, @Nullable String severity) { return "info".equals(severity) ? Severity.MINOR : Severity.MAJOR; } CheckstyleFormatImporter(SensorContext context, String linterKey); }
CheckstyleFormatImporter { protected Severity severity(String ruleKey, @Nullable String severity) { return "info".equals(severity) ? Severity.MINOR : Severity.MAJOR; } CheckstyleFormatImporter(SensorContext context, String linterKey); void importFile(File reportPath); }
CheckstyleFormatImporter { protected Severity severity(String ruleKey, @Nullable String severity) { return "info".equals(severity) ? Severity.MINOR : Severity.MAJOR; } CheckstyleFormatImporter(SensorContext context, String linterKey); void importFile(File reportPath);  }