diff options
| author | Amaury Levé | 2018-06-21 14:55:09 +0200 |
|---|---|---|
| committer | GitHub | 2018-06-21 14:55:09 +0200 |
| commit | 9bcc46b342cfb888f16c180cb0b3103335def5f1 (patch) | |
| tree | 6b85805bbedef51c974b6984cb42b53052f9b375 /sonar-css-plugin/src/main/resources | |
| parent | 913028fc4c913fec3bbc1800c00e526413040e01 (diff) | |
| download | sonar-css-9bcc46b342cfb888f16c180cb0b3103335def5f1.tar.bz2 | |
Rule S4653: Units should be valid (#50)
Diffstat (limited to 'sonar-css-plugin/src/main/resources')
3 files changed, 38 insertions, 1 deletions
diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4653.html b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4653.html new file mode 100644 index 0000000..283bf5d --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4653.html @@ -0,0 +1,20 @@ +<p>The W3C specifications define the <code>units</code> that can be used with lengths. A unit that is not part of the list of supported ones is likely +to be a typo and will be seen as a UI bug by the user.</p> +<p>This rule raises an issue each time a unit is not officially supported.</p> +<h2>Noncompliant Code Example</h2> +<pre> +a { + width: 10pixels; +} +</pre> +<h2>Compliant Solution</h2> +<pre> +a { + width: 10px; +} +</pre> +<h2>See</h2> +<ul> + <li> https://www.w3.org/TR/css3-values/#lengths </li> +</ul> + diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4653.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4653.json new file mode 100644 index 0000000..b6ee0e2 --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4653.json @@ -0,0 +1,16 @@ +{ + "title": "Units should be valid", + "type": "BUG", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, + "tags": [ + + ], + "defaultSeverity": "Blocker", + "ruleSpecification": "RSPEC-4653", + "sqKey": "S4653", + "scope": "Main" +} diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json index ba5ce46..a0e81bb 100644 --- a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json @@ -1,6 +1,7 @@ { "name": "Sonar way", "ruleKeys": [ - "S4647" + "S4647", + "S4653" ] } |
