Sonar Rules could not be filtered by 'available since'


(Jessica Ertel) #1
  • used versions: Sonar Server 7.4, sonar-java-plugin 5.8
  • Problem: Filtering Rules by ‘available since’ doesn’t have any effect
  • How to reproduce: When getting a new sonarQube version I first want to check the new added rules. I do this by navigating to the ‘Rules’ site and filtering by ‘languages=java’ and ‘available since’ with the date the new SonarJava version was released. This time when trying to filter in Rules for ‘available since’ there is no filtering at all. No matter which date I use, all rules are displayed every time.

Could you please fix that?
And is there another way to see the new rules despite of searching in the sources of the sonar-java-plugin?

Thank you for your reply,

(Julien Lancelot) #2

I’ve moved this thread to Get help -> SonarQube as this is not a bug.

(Julien Lancelot) #3

Hi @jess,

The ‘available since’ is not about the release date of a plugin, it’s about the date when the rule has been added into your SonarQube server.
I hope it will clarify how this filter is working.

Julien Lancelot

(Jessica Ertel) #4

Hi @julienlancelot,

thank you for your quick reply.

I think you didn’t get the problem right.
In my eyes it IS a BUG.

So assume you are filtering by ‘available since = 1.1.2018’ do you expect to get all rules? Also these rules that are available since 2015? I don’t expect this behaviour.
There should only be rules shown, which have an ‘available since’ date equal or after 1.1.2018.
In earlyer versions of the SonarQubeServer this worked for me.

I so no matter if I take the release date of the plugin or the release date of the sonarQubeServer or any other date: I always get ALL available rules. There is no filtering at all.

Sou could you please move this issue again to the bugs section?

(Julien Lancelot) #5


Sorry if I misunderstood your problem.
Before moving this issue as a bug, I would like to investigate a little more.
First, because I can’t reproduce this issue, and second, because no one else has. So there may be something wrong in your configuration.

In order to understand, cou you please tell me :

  • Have you recently migrate to 7.4 ?
  • Could you please send a screenshot of what you see ?
  • Could you please give the path ? It should be something like coding_rules?available_since=2018-11-01
  • Could you please check the web console log for error ?


(Jessica Ertel) #6


no problem.

There are no projects analyzed or custom rules. I only wanted to see the 11 new java rules that are mentioned here :

(Julien Lancelot) #7

Hi Jessica,

Thanks a lot for this information.

I confirm this is not a bug, the explanation is the same I gave 2 days ago : Available Since does not allow you to filter by date of release date of the related plugin.
This filter only allows to filter by date when the rule was added on your server.

So if a rule has been delivered in a plugin that was released 2 years ago, but you’re starting a fresh new installation of SonarQube today, using “Available Since” to 1 day ago, you’ll see all rules available in your SonarQube server.

I hope it’s now more clear.


(Jessica Ertel) #8

Hi @julienlancelot,

may be I did some mistakes in older versions so it worked for me there.
Okay, than now it’s clear, that it should not work.

BUT how could I now know, which of the 498 java rules are the 11 new ones mentioned in ?

Thanks for your help so far,

(Julien Lancelot) #10

That’s a good point, there’s no way for the moment to know the list of rules released in a SonarQube version.
We’re going to change that.