Skip to content

Reason of JSON-Analysis aborted should be provided #1083

Description

@slawekjaranowski

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:

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:

            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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementlifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions