CSS plugin 2.0: rule css:known-properties produces false positives

109 views
Skip to first unread message

stephan....@qaware.de

unread,
Jul 22, 2016, 7:43:28 AM7/22/16
to SonarQube
Hi,

the rule css:known-properties of the CSS plugin 2.0 produces false positives on my CSS files. Example:

.header-controls {
text-align: right;
}

produces issue 'Remove this usage of the unknown "text-align" property.'

It looks like the issue exists for every CSS property that I use. This was not the case with SonarQube 4.5.7 and CSS plugin 1.7.


Many thanks in advance & best regards

Stephan

David Racodon

unread,
Jul 22, 2016, 6:05:39 PM7/22/16
to stephan....@qaware.de, SonarQube
Hi Stephan,

Your issue is quite strange...
I got version 2.0 from the Update Center and run an analysis and didn't get any issue.

Could you try and run a new analysis from a fresh instance?
Could you please provide the full log of an analysis of one of the files leading to this issue? Could you also provide the file?

Thank you

Regards,
 

David RACODON
Freelance QA Consultant

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/bb35114b-5564-44a0-8152-b3dc24fc7107%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

stephan....@qaware.de

unread,
Jul 26, 2016, 7:16:58 AM7/26/16
to SonarQube, stephan....@qaware.de
Hi David,

thanks for your reply.

The issue does not occur with a fresh SonarQube 5.6 instance with a clean database. So the issue is probably related to the database that was migrated from SonarQube version 4.5.7.

The issue persists if the project is deleted from the migrated database via the SonarQube user interface and re-analysed.

The analysis log does not contain any output from the CSS plugin.

Best regards
Stephan

David Racodon

unread,
Jul 26, 2016, 11:15:20 AM7/26/16
to Stephan Schuster, SonarQube
Hi Stephan,


The issue does not occur with a fresh SonarQube 5.6 instance with a clean database. So the issue is probably related to the database that was migrated from SonarQube version 4.5.7.
The issue persists if the project is deleted from the migrated database via the SonarQube user interface and re-analysed.

OK... 

The analysis log does not contain any output from the CSS plugin.

Could you please provide the analysis log of the project analysis in debug mode to see if we can get something from it?

If you analyze a brand new CSS project on your migrated instance, it works fine?

Thank you

Regards,


David RACODON
Freelance QA Consultant

stephan....@qaware.de

unread,
Aug 2, 2016, 6:09:03 AM8/2/16
to SonarQube, stephan....@qaware.de
Hi David,

unfortunately I cannot provide the complete analysis log as it contains confidential information.

Can you point me to the parts you are interested in?

I build a simple Maven project containing a single CSS file and tried to analyze it with the migrated SonarQube instance, but the CSS file gets ignored completely.

Best regards
Stephan

David Racodon

unread,
Aug 4, 2016, 4:06:57 PM8/4/16
to Stephan Schuster, SonarQube
Hi David,

unfortunately I cannot provide the complete analysis log as it contains confidential information.
Can you point me to the parts you are interested in?

I have no idea where your issue could come from, so I would need the entire log to try and find out a clue. 

I build a simple Maven project containing a single CSS file and tried to analyze it with the migrated SonarQube instance, but the CSS file gets ignored completely.

There must be an analysis configuration issue. Could you please double-check your configuration?

Thank you

Regards,

David RACODON
Freelance QA Consultant

To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/ca75738f-284f-4e2a-ae84-79843bc43e09%40googlegroups.com.

David Racodon

unread,
Aug 21, 2016, 11:52:20 AM8/21/16
to Stephan Schuster, SonarQube
Hi Stephan,

I made the StandardCssObject factories more robust by removing the usage of reflection: https://github.com/SonarQubeCommunity/sonar-css/commit/9cc8076261c7435408aaf62f9b3bac1dc9bcadad

It should fix your issue. Feel free to build a snapshot from the master branch and provide some feedback.

Thank you

Regards,

David RACODON
Freelance QA Consultant

stephan....@qaware.de

unread,
Aug 30, 2016, 2:02:57 AM8/30/16
to SonarQube, stephan....@qaware.de
Hi David,

version 2.1-RC1 (https://github.com/SonarQubeCommunity/sonar-css/tree/2.1-RC1) fixes the issue, many thanks!

Best Regards
Stephan

David Racodon

unread,
Aug 30, 2016, 3:21:16 AM8/30/16
to Stephan Schuster, SonarQube
Great! Many thanks for your feedback!

David RACODON
Freelance QA Consultant

To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/b3d8903f-c001-4b8e-ba76-c0e4e979cf72%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages