Custom Rules with SonarQube Community, also with SonarQue IntelliJ Plugin

Please provide

  • Operating system: Ubuntu 24
  • SonarQube for IntelliJ plugin version: 11.11.1.84021
  • IntelliJ version: 2025.2.6.1 (Build #IU-252.28539.33, built on January 9, 2026)
  • Programming language you’re coding in: Java
  • Is connected mode used:
    • SonarQube Community Build: v25.9.0.112764

And a thorough description of the problem / question:

With regard to this thread, here my question in a new thread…

Just for my understanding, the custom rules I set up in my SonarQube Community are not used by the SonarQube IDE Plugin for IntelliJ during coding, but only the built-in defaults? My custom rules only get evaluated during scanning on the server-side later?

how do I have to understand the statement from the documentation, that rules are taken from the server?

It would explain though, why I just spent 2h trying to figure out why my custom rules are not being used in my IDE. What makes it even more confusing is that I DO see my custom rules used in the hover-description, but apparently it is not used for validation.

e.g. I adjusted the test class name pattern but I can never satisfy the rule even though I already have

Screenshot_20260202_124355

Screenshot_20260202_124355882×165 17.5 KB

If that is really the case that custom rules are not used for validation, it’s going to be very hard to explain to our developer team of 20 people - getting an issue displayed even though I actually meet all the requirements is the least satisfying there is and doesn’t match “learn as you code” imho. I understand the performance bottle neck, but then at least don’t show me that my rule adjustment has been downloaded or maybe even the profile being used.

The only workaround is probably providing a local ruleset file, I guess?

– Edit –

I just saw that apparently the problem is not just within IntelliJ but also if I look at evaluations on the server side

I can’t find anything in the configurations I might have done wrong.
Any idea would be much appreciated

Hi,

So it appears that your rule is being applied in both places, right?

It seems the problem is that your regex doesn’t seem to be honored, right? I see that we’re talking about Java. Can you share what version of SonarQube you’re using? Check the page footer if you’re not sure.

 
Ann

Thank you for your reply
Your resume is correct

From my original post above:

  • Is connected mode used:

    • SonarQube Community Build: v25.9.0.112764

Thanks

Hi,

Okay, only the latest version of SonarQube Community Build is supported. Currently that’s 26.1 (although 26.2 is imminent). Can you upgrade and see if this is still a problem?

 
Thx,
Ann

Thank you

we’ve updated to “Community Build v26.1.0.118079”

still the same result: the overridden RegEx of our Quality Profile (extended from Sonar-way) is not being used for Naming conventions on TestClasses (see picture above).

In other words, the sonar-way still takes precedence during check while the adjusted RegEx is also displayed (Web-View and IDE-View)

Hi,

Thanks for trying the upgrade.

I’m going to flag this for the language experts. Meanwhile, and just in case, can you provide a verbose analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann