Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter sonar issues by status #269

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Filter sonar issues by status #269

merged 1 commit into from
Feb 16, 2024

Conversation

andrecsilva
Copy link
Contributor

@andrecsilva andrecsilva commented Feb 15, 2024

Overview

Sonar issues whose status are RESOLVED are now filtered from the results. Closes #267 .

@andrecsilva andrecsilva marked this pull request as ready for review February 15, 2024 12:54
Copy link
Member

@drdavella drdavella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "RESOLVED" the only status we want to ignore? What about "CLOSED"? Probably there are others? Is it possible that we want to invert this and only consider issues that are "OPEN"?

@clavedeluna
Copy link
Contributor

Is "RESOLVED" the only status we want to ignore? What about "CLOSED"? Probably there are others? Is it possible that we want to invert this and only consider issues that are "OPEN"?

and resolution == "FIXED"

@andrecsilva
Copy link
Contributor Author

Is "RESOLVED" the only status we want to ignore? What about "CLOSED"? Probably there are others? Is it possible that we want to invert this and only consider issues that are "OPEN"?

@clavedeluna @drdavella
You can only have RESOLVED or OPEN. If an issue is marked as RESOLVED it is accompanied by a resolution field. I don't remember the exact values for it but WONTFIX and FIXED are some of them.

This was tested in the latest SonarQube version, locally. It may be the case that other values are possible from previous version.

@drdavella
Copy link
Member

drdavella commented Feb 15, 2024

@andrecsilva the snippet in #267 was taken from actual API output and it appears to contain "CLOSED" as a possible value. It feels safer if we invert the condition and just check for "OPEN".

It seems likely that the API might have other values than those produced by SonarQube locally since users can make decisions about how to triage certain issues.

Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@andrecsilva andrecsilva added this pull request to the merge queue Feb 16, 2024
Merged via the queue into main with commit c20d18a Feb 16, 2024
12 checks passed
@andrecsilva andrecsilva deleted the sonar-json-filter branch February 16, 2024 14:09
@drdavella
Copy link
Member

Closes #267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore closed/fixed issues in Sonar security JSON results
3 participants