dependency-check / dependency-check/dependency-check-sonar-plugin

Reason of JSON-Analysis aborted should be provided

Open
#1,083 8 comments 2 reactions 0 assignees View on GitHub
enhancement lifecycle/frozen
Dominant language
Java
Stars
694
Forks
146
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
When any problem occurs during parsing json report check is silently skip

There is code:

```java

try {
JsonReportFile report = JsonReportFile.getJsonReport(context.config(), fileSystem, pathResolver);
return Optional.of(JsonReportParserHelper.parse(report.getInputStream()));
} catch (FileNotFoundException e) {
LOGGER.info("JSON-Analysis skipped/aborted due to missing report file");
LOGGER.debug(e.getMessage(), e);
} catch (ReportParserException e) {
LOGGER.warn("JSON-Analysis aborted");
LOGGER.debug(e.getMessage(), e);
} catch (IOException e) {
LOGGER.warn("JSON-Analysis aborted due to: IO Errors", e);
}
```

**Describe the solution you'd like**

should be at least like for IOException:

```java
LOGGER.warn("JSON-Analysis aborted", e);

```

**Describe alternatives you've considered**
I would like to consider to break analize due to ReportParserException or IOException.

Eventually I would like to consider to add an option to require analize with success in strict mode.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.