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

Group SonarQube results by SonarQube severinity #95

Open
vlavasa opened this issue Nov 20, 2014 · 4 comments
Open

Group SonarQube results by SonarQube severinity #95

vlavasa opened this issue Nov 20, 2014 · 4 comments

Comments

@vlavasa
Copy link

vlavasa commented Nov 20, 2014

After analyse, there is Inspection window. I would like to have posibility to group finded issues by Sonar severity - blocker, critical, major, minor, info. Now it is not possible.

@omayevskiy
Copy link
Contributor

it was possible in v1, but for now it is removed, as it makes things more complicated.

At the moment in the inspection window you can

  • Expand All
  • Click somewhere in the window and start typing
  • Type MAJOR if you want to find all MAJOR issues

It''s not perfect, but works fine if you want explore only CRITICALs and MAJORs
bildschirmfoto 2014-11-20 um 11 50 31

@vlavasa
Copy link
Author

vlavasa commented Nov 20, 2014

Thanks you for howto

@omayevskiy
Copy link
Contributor

to brainstorm on this:

assuming there would not be any more one global inspection SonarQube, but one inspection per sonar rule like it was in the v1. This would allow to group inspections by severity but also more then this. Furthermore there would be two inspections per sonar rule, one for old one for new. So that there would be two groups of inspections:

  • SonarQube (new issues)
    • Don't use print ...
    • Avoid this and that ...
  • SonarQube
    • Don't use print ...
    • Avoid this and that ...

Then consequences would be:

  • (-) execute inspection by name would do another thing, it would not find all new issues any more, but only new (or old) issue for one single sonar rule. Executing new rules would be more complicated, as it would require to create an inspection profile containing new issues only. One could search for "Don't use print ..." but not for "SonarQube" any more.
  • (+) But it would be possible to sort inspections by name, by severity and all other intellij features in the inspection window
  • (-) currently it is an open question, how to register new inspections dynamically without IDE restart. Answered by jetbrains during creation of this post, it is not possible: https://devnet.jetbrains.com/message/5528984#5528984
    That means as soon the plugin detects a new rule, it would need a restart first, before showing the results, currently this is not the case as every sonar issue is represented by one single intellij inspection.

In the inspection window the results would looks instead of the current old way:

  • python-sonar-runner
    • SonarQube (new issues) -- inspection group
      • SonarQube Issue -- inspection name
        • src
          • [MAJOR] Replace print statement ...
          • [INFO] Move this ...

like this new way:

  • python-sonar-runner
    • SonarQube (new issues) -- inspection group
      • Avoid print statements ... -- inspection name
        • src
          • Replace print statement ... -- inspection description
      • Dont do this and that ... -- inspection name
        • src
          • Move this ...

grouped by severity it would looks like:

  • python-sonar-runner
    • Warning
      • SonarQube (new issues) -- inspection group
        • Avoid print statements ... -- inspection name
          • src
            • Replace print statement ... -- inspection description
    • Info
      • SonarQube (new issues) -- inspection group
        • Dont do this and that ... -- inspection name
          • src
            • Move this ...

@PIPkent
Copy link

PIPkent commented Apr 28, 2016

Filtering analysis result by severity is very helpful. For example, an application has 200 files. Each of them may have one to two issues. Most are minor or info. But there is one block and two major. Current analysis result shows all those 200-400 issues basing on the alphabet order of files' names. Users have to expand them all and manually search for "block" and "Major". Is it efficient and user friendly? Will any user decide to fix a "block" issue basing on file's name? For example, if it is in "CustomerAccountServiceImpl", he fixes it. But if it is in "CustomerDao", he ignore it.

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

No branches or pull requests

3 participants