Skip to content

Commit

Permalink
Reduce log severity to warning for unfound ESLint reports (#4622)
Browse files Browse the repository at this point in the history
  • Loading branch information
yassin-kammoun-sonarsource authored Mar 26, 2024
1 parent 3e0b6d3 commit d0fefb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void importReport(File report, SensorContext context) {
}
}
} catch (IOException | JsonSyntaxException e) {
LOG.error(FILE_EXCEPTION_MESSAGE, e);
LOG.warn(FILE_EXCEPTION_MESSAGE, e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void should_log_invalid_report() throws Exception {
Collection<ExternalIssue> externalIssues = context.allExternalIssues();
assertThat(externalIssues).hasSize(0);

assertThat(logTester.logs(LoggerLevel.ERROR))
assertThat(logTester.logs(LoggerLevel.WARN))
.contains("No issues information will be saved as the report file can't be read.");
}

Expand All @@ -128,7 +128,7 @@ void should_log_not_existing_report() throws Exception {
Collection<ExternalIssue> externalIssues = context.allExternalIssues();
assertThat(externalIssues).hasSize(0);

assertThat(logTester.logs(LoggerLevel.ERROR))
assertThat(logTester.logs(LoggerLevel.WARN))
.contains("No issues information will be saved as the report file can't be read.");
}

Expand Down

0 comments on commit d0fefb2

Please sign in to comment.