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

[Github] PR Decoration - Fixed issues are annotated as error #190

Closed
cncgoko opened this issue Jun 10, 2020 · 1 comment
Closed

[Github] PR Decoration - Fixed issues are annotated as error #190

cncgoko opened this issue Jun 10, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@cncgoko
Copy link
Contributor

cncgoko commented Jun 10, 2020

Describe the bug
After committing on an existing PR to resolve previously idetified issues, the fixed issues appear as issue on line 0-1

To Reproduce
Steps to reproduce the behavior:

  1. Create a PR with issues
  2. Let Sonarqube analyse and decorate the PR
  3. Fix one of the issue and push on the same PR
  4. Analyse and decorate again.

Expected behavior
Fixed issues should be filtered out of annotated issue. Actually only resolved issues should be annotated.

Screenshots
If applicable, add screenshots to help explain your problem.

Software Versions

  • SonarQube Version: 7.9.3
  • Plugin Version: Release 1.3.1

Additional context
A filter should be added here

.filter(i -> i.getComponent().getType() == Component.Type.FILE).map(componentIssue -> {

something like

.filter(i -> i.getIssue().getResolution() == null)

or

.filter(i -> i.getIssue().getStatus() == org.sonar.api.issue.Issue.STATUS_OPEN)

See Sonarqube issue status for more info: https://github.com/SonarSource/sonarqube/blob/3f6f5496277c76c2498fd245a112931d19830497/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java

I can open a PR if the proposed solution is ok.

@cncgoko cncgoko added the bug Something isn't working label Jun 10, 2020
cncgoko added a commit to cncgoko/sonarqube-community-branch-plugin that referenced this issue Jun 10, 2020
cncgoko added a commit to cncgoko/sonarqube-community-branch-plugin that referenced this issue Jun 10, 2020
Fix proposal for mc1arke#190

Only decorate with unresolved and non closed issues on Github pull requests.
Currently, fixed issues are still displayed on line 0 of the file, although it is correctly marked as fixed in Sonarqube
cncgoko added a commit to cncgoko/sonarqube-community-branch-plugin that referenced this issue Jun 10, 2020
Fix proposal for mc1arke#190

Only decorate with unresolved and non closed issues on Github pull requests.
Currently, fixed issues are still displayed on line 0 of the file, although it is correctly marked as fixed in Sonarqube
cncgoko added a commit to cncgoko/sonarqube-community-branch-plugin that referenced this issue Jun 11, 2020
Fix mc1arke#190 - Don't decorate with fixed issue
cncgoko added a commit to cncgoko/sonarqube-community-branch-plugin that referenced this issue Jun 11, 2020
Fix proposal for mc1arke#190

Only decorate with unresolved and non closed issues on Github pull requests.
Currently, fixed issues are still displayed on line 0 of the file, although it is correctly marked as fixed in Sonarqube
mc1arke pushed a commit that referenced this issue Jun 13, 2020
Only decorate with unresolved and non closed issues on Github pull requests.
Currently, fixed issues are still displayed on line 0 of the file, although it is correctly marked as fixed in Sonarqube.
mc1arke pushed a commit that referenced this issue Jul 16, 2020
Only decorate with unresolved and non closed issues on Github pull requests.
Currently, fixed issues are still displayed on line 0 of the file, although it is correctly marked as fixed in Sonarqube.
mc1arke pushed a commit that referenced this issue Jul 16, 2020
Only decorate with unresolved and non closed issues on Github pull requests.
Currently, fixed issues are still displayed on line 0 of the file, although it is correctly marked as fixed in Sonarqube.
@mc1arke
Copy link
Owner

mc1arke commented Jul 17, 2020

Fix release in 1.3.2 of the plugin (Sonarqube 7.8-8.0) and 1.4.0 (Sonarqube 8.1)

@mc1arke mc1arke closed this as completed Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants