New feature: sort by / order by line descending as default in list of issues

As a developer, I’d like to be able to configure the list of issues so that it sorts the issues shown for every “file block” (Java code) in descending order within that file block.

The reason is the following:

When I start fixing an issue in line 22, it might be necessary to wrap the code one more line because it becomes longer during that fix.
Now, when there is another issue on line 180 (in the original file before the fix), the issue might not be on line 180 anymore, but in line 181. When I reach that issue in Sonar (which is usually opened on my 2nd screen), I usually press Ctrl+G (goto line) and enter the line number “180”. But there is no issue in line 180 anymore, because now the issue is in line 181 because of the new line above.

This gets even more confusing when there are more issues above.

This confusion can be avoided when SonarQube “guides” the developer to start fixing the issues from the bottom of the file. For this, it would be really helpful if the default ordering of the lines is descending in SonarQube

Hi,

It’s not clear to me the context you’re talking about. In SonarLint issues will naturally be presented in code in the correct order, and move with their lines. Similarly, in the issues interfaces in SQ issues are also listed in line order per file.

 
Ann

I’d like to have the order reversed in SQ

Hi,

To be clear, your request is that in this view issues would be reverse (sub-)sorted by line number

And in this view, arrowing down on the left would move you up on the right?

You’ve mentioned that you want this to help you easily find issues in a file as you’re fixing them. Have you considered using SonarLint, which will give you an always-up-to-date list of the issues in your file?

 
Ann

Yes, I’m using SonarLint but I was thinking about removing it. It causes performance and usability issues in Eclipse (e.g. doing a file search -> going to a search result, changing code, save file -> analysis runs on the file, bringing SonarLint view to front so I have to manually go back to the search results tab … very annoying)

Also, the company I work for requires the use of SonarQube

Hi,

Can you precise the version of SonarLint you are using, and also confirm you are talking about the “SonarLint On-The-Fly” view? I’m asking because I don’t understand how this behavior is possible. On our side we did nothing to bring this view to front.
Regarding performance issues, I would be also interested to investigate your issue, so could you please open a new thread in the SonarLint category, with verbose logs of a SonarLint analysis?

Thanks

SonarLint is not the topic here