RFF - CSS / SCSS / Less Analyzer 3.0

122 views
Skip to first unread message

David Racodon

unread,
Jan 12, 2017, 4:20:42 PM1/12/17
to SonarQube
Hi all,

I would like to get your feedback on version 3.0 of the CSS / Less analyzer that can now be called CSS / SCSS / Less analyzer as it adds support for SCSS. SCSS support comes with more than 80 rules.

Release notes: https://github.com/racodond/sonar-css-plugin/releases/tag/3.0-RC1
  • Add support for SCSS with more than 80 rules. SCSS specific rules:
    • [SCSS] New rule: Declarations and directives should be properly organized
    • [SCSS] New rule: Rulesets should not be nested too deeply
    • [SCSS] New rule: Empty control flow directive blocks should be removed
    • [SCSS] New rule: Single-line comments (//) should be preferred over multi-line comments (/* ... */)
    • [SCSS] New rule: Useless parentheses following @include and @mixin with no parameter should be removed
    • [SCSS] New rule: Empty mixins should be removed
    • [SCSS] New rule: Two branches in the same conditional structure should not have exactly the same implementation
    • [SCSS] New rule: Control flow directives @if, @else if, @else, @for, @while, and @each should not be nested too deeply
    • [SCSS] New rule: Nested properties should define at least two properties
    • [SCSS] New rule: Deprecated unescaped multiline strings should not be used
    • [SCSS] New rule: Always use 'through' instead of 'to' in @for directives
    • [SCSS] New rule: Conditions should not be too complex
    • [SCSS] New rule: @debug directives should not be used
    • [SCSS] New rule: Related @if / @else if directives should not have the same condition
    • [SCSS] New rule: Mixins should follow a naming convention
    • [SCSS] New rule: Custom functions should follow a naming convention
    • [SCSS] New rule: @if ... @else if ... constructs should end with @else directives
    • [SCSS] New rule: SCSS variables should follow a naming convention
  • Plus other improvements:
    • [CSS] New rule: CSS variables should follow a naming convention
    • [All] New rule: Files should not contain too many lines
    • [All] New rule: Files should contain an empty new line at the end
    • [All] New rule: Empty stylesheets should be removed
    • [All] New rule: Single quotes should be used instead of double quotes for strings
    • And many more


Vote is open for a week.

As usual, your feedback is more than welcome.

Enjoy!

David RACODON
Freelance QA Consultant

dfl...@ippon.fr

unread,
Jan 13, 2017, 5:39:10 AM1/13/17
to SonarQube
Hi,

+1

Tests with SonarQube 5.6.4
Test with a small project : No blocking error

INFO: Sensor CSS Analyzer Sensor
INFO: 8 source files to be analyzed
INFO: Sensor CSS Analyzer Sensor (done) | time=3731ms
INFO: Sensor Embedded CSS Analyzer Sensor
INFO: 8/8 source files have been analyzed
INFO: 0 source files to be analyzed
INFO: Sensor Embedded CSS Analyzer Sensor (done) | time=12ms
INFO: Sensor SCSS Analyzer Sensor
INFO: 0/0 source files have been analyzed
INFO: 45 source files to be analyzed
INFO: Sensor SCSS Analyzer Sensor (done) | time=341ms
INFO: 45/45 source files have been analyzed

Regards,

Denis

David Racodon

unread,
Jan 19, 2017, 1:04:53 PM1/19/17
to dfl...@ippon.fr, SonarQube
Hi all,

The vote is now closed and I will proceed with the release.
Thanks Denis for your feedback!

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/64f8b0cb-05cf-453d-ae7d-92a41012f677%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages