Skip to content
No description or website provided.
Java CSS HTML Shell
Find file
New pull request
Pull request Compare This branch is 417 commits ahead of kalidasya:master.
Latest commit d35578e @kalidasya kalidasya Merge pull request #148 from SonarCommunity/feature/Add_rule_BOM_in_U…

Add rule: use of BOM for UTF-8 files

SonarQube CSS Plugin

Build Status

Project homepage:

Issue tracking:

CI builds:



This plugin enables code QA analysis of CSS source code within SonarQube:

  • Computes metrics: lines of code, number of CSS rules, complexity, etc.
  • Validates your CSS code
  • Performs more than 50 checks such as: Stylesheets should not contain too many selectors, Empty declarations should be removed, Box model size should be carefully reviewed, etc.


Getting started in two minutes

Download the package and follow the instructions of the README file. This package contains the SonarQube server with the CSS plugin, the analyzer (SonarQube Runner) and a sample project.

Installing and configuring your SonarQube platform from scratch

  1. Install SonarQube
  2. Install the CSS plugin either by a direct download or through the update center.
  3. Install your favorite analyzer (SonarQube Runner, Maven, etc.) and analyze your code.



Number of rules.


The following elements increment the complexity by one:

  • Class selector
  • ID selector
  • Attribute selector
  • Type selector
  • Pseudo-class selector
  • At-rule


It computes the complexity/rule, meaning the average number of selectors per rule.

It gives a measurement on how specific the selectors are.

As the computation of complexity in the CSS plugin is still in its early stage, it can be turned off if necessary at global and project levels.

Something went wrong with that request. Please try again.