URL parameters changed for the new rules in UI

I’m using v2025.2 of SonarQube server.

I’m facing a problem in pointing Sonar rules in the Sonar server. For the newly added rules, the link doesn’t work with the parameters that I was using before.
old - https://my_sonar_server/coding_rules?languages=cpp&open=cpp:S3805 (works)
new - https://my_sonar_server/coding_rules?languages=cpp&open=cpp:S7116 (doesn’t work)

The new rules works by passing different parameters
https://my_sonar_server/coding_rules?rule_key=cpp:S7116&open=cpp:S7116 (works)

This is a problem for me as I’m computing the link for the rule (by adding the parameters in our automation) which we are using in a document for reference and it become invalid for newly added rule due to parameter change in URL, hence we have to change the parameters as it got changed recently.

Not sure if it’s reliable to depend on the current parameters for rule URL. Can you please suggest?

Hey @Rajee

No idea how we managed to make the link work with some rules and no others! :smiley:

In good news, the new format seems to work with both rules you mentioned, so you can use the new format with the “old” rule.

https://my_sonar_server/coding_rules?rule_key=cpp:S3805&open=cpp:S3805

With that said, the behavior is quite weird so I’ll flag this for the team in case it’s hiding a bug.

Hi @Rajee ,

In short, you can rely on the following format already shared earlier:
/coding_rules?open=java%3AS2204&rule_key=java%3AS2204

This is not going to change, and in fact, this is the only reliable way for the rule to be shown (at least now). By the way the same format is used if you copy permanent link from UI by clicking copy button

I agree that the behaviour of open query param is really counter-intuitive , but this param won’t guarantee that rule’ details will be shown, therefore rule_key has to be added in order to filter list of rules by the rule you are looking for.

With that, we probably can improve this behaviour, I’ve added a ticket to our backlog.

Thanks for reverting on this and sharing the reliable parameters.

I’m curious about the static page publishing the rules.
https://rules.sonarsource.com/
Can we rely on this?

You can generally rely on it for reference and documentation, but keep in mind that it is is always kept current with the latest set of rules released by SonarSource. Your organization’s SonarQube instance may not always use the very latest version of SonarQube.