Error reporting while typing moves editor window

Environment:

  • Operating system: Fedora 41 (also happens on MacOS)
  • SonarQube for IntelliJ plugin version: 10.15.0.80347
  • IntelliJ version: ntelliJ IDEA 2024.3.2.1 (Ultimate Edition)
  • Programming language you’re coding in: Go
  • Is connected mode used:
    • SonarQube Server: Data Center Edition v10.7 (96327)

problem:
While editing the Sonar checker gets active and reports a “A parsing error occurred in this file.” with “go:ParsingError” on the right side. Strangely the Sonar status icons in the top right get updated quickly while the error message usually takes a bit and might only come when there are multiple issues in the line. The main problem is however that this error bar shrinks the editor window size by that one row and the whole source code moves one line down and once the issue is fixed it moves up again. This can be very annoying as the code jumps up and down.

Hey @HendrikH, thank you very much for your feedback.

If you are not in Connected Mode, I recommend you turn off the rule go:ParsingError within the SonarQube for IDE settings:

If you are connected to a SonarQube Server, I suggest asking to modify the Quality Profile you are using, and disabling this rule.

Also, I noticed that all our languages have this rule disabled by default, except for Go. I will share the feedback internally so that this rule gets disabled in the future. It does not make sense for the IDE to report this issue, as it can be very noisy.

For reference, here is the ticket to track the progress about disabling this rule by default.

Thanks for the quick response, I was aware of that option. I’m working in connected mode. The profile is not used by me but many other people. I’ll give it a try though. I guess the rule basically makes some sense even though the compiler will of course also complain about such issues.

I had also noticed that rule is turned off for most other languages. For Ruby I also see it active.
Btw, the UI has a small bug in my opinion. If you filter for example by “parse” you are left with just one entry and now the checkbox behind “Go” shows the same values as in “Go parser failure”. So it shows as if all checkboxes were selected in the category.

It would be nice if you could also look into changing the UI so that the code never jumps due to the display of the error message.

Unfortunately, this file-level issue (displayed as a bar) cannot be modified to avoid the “jumps”. It is inherent to the way IntelliJ works, which is partially why we do not enable such rules by default. Such feedback is always appreciated, although I’m not sure we can find a more suitable solution in this current situation. Perhaps we should not display this issue as file-level for this particular rule?

Btw, the UI has a small bug in my opinion. If you filter for example by “parse” you are left with just one entry and now the checkbox behind “Go” shows the same values as in “Go parser failure”. So, it shows as if all checkboxes were selected in the category.

You are right about the behavior, but I believe this is expected. It adapts to what is currently shown within the category. Applying the changes when the Go checkbox is empty will not turn off all rules if you filter on a specific one.

Hey @HendrikH, we have just released SonarQube for IntelliJ, which disables this Go rule by default. If you have any further feedback, do not hesitate to do so. Thank you!

1 Like