[VOTE] CSS Plugin 1.3

107 views
Skip to first unread message

David Racodon

unread,
Jul 16, 2015, 5:27:30 PM7/16/15
to sona...@googlegroups.com
Hi all,

I would like to call a vote for version 1.3 of the CSS plugin.

  • Adding a bunch of new rules
  • Providing a CSS validator
  • Computing complexity
  • Fixing a few parser issues
An RC version of this plugin is available at https://github.com/SonarCommunity/sonar-css/releases/tag/1.3-RC

Vote is open for 72 hours.

[ ] +1
[ ] +0
[ ] -1

As usual, your feedback is more than welcome.

Enjoy!

David RACODON
Freelance QA Consultant

G. Ann Campbell

unread,
Jul 20, 2015, 6:07:23 AM7/20/15
to sona...@googlegroups.com, david....@gmail.com
Hi David,

I've run a few analyses with the new version. It looks pretty solid. Just a few points
  • This version includes a ticket to add the rule 'There should not be any whitespaces between "!" and the "important" annotation', but that rule shows up as deprecated...?
  • The message I get for "Property values should be valid" seems a bit excessive:
    Update the invalid value of property "cursor". Expected format: [[ <uri> [<x> <y>]?,]* [auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing]
    In this case I would probably opt for a less explicit message and put some of this detail in the description
  • I'm wondering if this is a FP:
      color: #808080, /* blue */ #ffa500;
    Update the invalid value of property "color". Expected format: <color>
  • ditto:
      transform: rotate(90deg), skew(30deg), scale(2, 4);
    Update the invalid value of property "transform". Expected format: none | <transform-function>+ 


Just FYI, I get parsing errors on the CSS in the sonarqube/sonar-server module. I know at least some of them are valid; I just came across this in one file: 
body {
  height: yo mama

But others are on this type of construction:
19: #data-uri {
20:   background: url(data:image/png;charset=utf-8;base64,
21:     kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
        ^
22:     k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
23:     kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);


Ann

David Racodon

unread,
Jul 20, 2015, 8:51:06 AM7/20/15
to G. Ann Campbell, sona...@googlegroups.com
Hi Ann,

Thanks a lot for your thorough review.

This version includes a ticket to add the rule 'There should not be any whitespaces between "!" and the "important" annotation', but that rule shows up as deprecated...?

Good catch. Its replacement is in version 1.3 but this rule was never released. So, I just removed it: https://github.com/SonarCommunity/sonar-css/commit/6a3aefff15f338e8eb04c8446faa471b6669605e


The message I get for "Property values should be valid" seems a bit excessive:

I agree that it might be a bit excessive for some validators. 


In this case I would probably opt for a less explicit message and put some of this detail in the description

Till http://jira.sonarsource.com/browse/SONAR-6632 is fixed, I would leave the validator syntax in the issue message.


I'm wondering if this is a FP:
  color: #808080, /* blue */ #ffa500;

I can't find a reference (W3C, Mozilla, w3Schools, ...) that states that the color property can be a list of colors and how it would be interpreted. Could you please provide a link? 


transform: rotate(90deg), skew(30deg), scale(2, 4);

I can't find a reference (W3C, Mozilla, w3Schools, ...) that states that the transform property can be a comma-separated list. It can be a whitespace-separated list and this is supported by the plugin validator. Could you please provide a link?  


body {
  height: yo mama

The plugin is useful then :-)


But others are on this type of construction:
19: #data-uri {
20:   background: url(data:image/png;charset=utf-8;base64,
21:     kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
        ^
22:     k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
23:     kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);

I usually write the whole property on the same line. I didn't find that much info on line breaking in CSS. Just this post that tells to use quotes and anti-slash at the end of each line: http://stackoverflow.com/questions/11398205/base64-background-image-in-multiple-lines but I can't find any reference to corroborate it. So, I'm not keen to try and support this syntax for now unless I can find some reference. As a first guess, it won't be easy in terms of grammar as well. What do you think?

Thanks again for your feedback!

Regards,

 

David RACODON
Freelance QA Consultant

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/ZFNwIUb4kuc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/2d184aa7-b3ed-48d7-8562-4d42dda281ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

G. Ann Campbell

unread,
Jul 20, 2015, 9:32:31 AM7/20/15
to sona...@googlegroups.com, david....@gmail.com, ann.ca...@sonarsource.com
@David, I don't have the references you requested. The snippets I quoted looked valid enough to me (as a non-CSS writer), but if you say they're not then I believe you. :-)

David Racodon

unread,
Jul 20, 2015, 10:00:38 AM7/20/15
to G. Ann Campbell, sona...@googlegroups.com
Thanks for your feedback anyway!

David RACODON
Freelance QA Consultant

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/ZFNwIUb4kuc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

David Racodon

unread,
Jul 22, 2015, 12:50:26 PM7/22/15
to SonarQube, ann.ca...@sonarsource.com
Hi,

The vote is now closed and the release is available at https://github.com/SonarCommunity/sonar-css/releases/tag/1.3
@SonarSource: Could you please announce the release and update the Update Center?

Thank you

Regards,

David RACODON

G. Ann Campbell

unread,
Jul 23, 2015, 4:29:26 AM7/23/15
to SonarQube, david....@gmail.com, david....@gmail.com
Hi David,

You can make your own release announcement. 

I assume compatibility is still 4.5.2-LATEST?


Ann

G. Ann Campbell

unread,
Jul 23, 2015, 4:37:05 AM7/23/15
to SonarQube, David Racodon
Also, @David, where can the new jar be downloaded?



---
G. Ann CAMPBELL | SonarSource
Product Owner

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/ZFNwIUb4kuc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

David Racodon

unread,
Jul 23, 2015, 5:37:26 AM7/23/15
to G. Ann Campbell, SonarQube
Hi Ann,

I assume compatibility is still 4.5.2-LATEST?

Correct 


You can make your own release announcement. 

OK So, I assume that it is no longer possible to announce via http://www.sonarsource.com/category/plugins-news/page/2/, right?


Also, @David, where can the new jar be downloaded?


Regards,

David RACODON
Freelance QA Consultant

G. Ann Campbell

unread,
Jul 23, 2015, 10:41:25 AM7/23/15
to SonarQube, david....@gmail.com, david....@gmail.com
Hi David,

I can't put this version in the update center because your pom still has <version>1.3-SNAPSHOT</version>


On Thursday, 23 July 2015 11:37:26 UTC+2, David Racodon wrote:
You can make your own release announcement. 

OK So, I assume that it is no longer possible to announce via http://www.sonarsource.com/category/plugins-news/page/2/, right?

Sorry, no. 
 

David Racodon

unread,
Jul 23, 2015, 11:04:09 AM7/23/15
to G. Ann Campbell, SonarQube

David RACODON
Freelance QA Consultant

G. Ann Campbell

unread,
Jul 23, 2015, 11:51:18 AM7/23/15
to SonarQube, david....@gmail.com, david....@gmail.com
The new version is in the update center.



On Thursday, 23 July 2015 17:04:09 UTC+2, David Racodon wrote:

David RACODON
Freelance QA Consultant

David Racodon

unread,
Jul 23, 2015, 3:13:35 PM7/23/15
to SonarQube, ann.ca...@sonarsource.com
Thanks
Reply all
Reply to author
Forward
0 new messages