aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-css-plugin/src/main/resources/org
diff options
context:
space:
mode:
authorAmaury Levé2018-06-25 13:41:54 +0200
committerElena Vilchik2018-06-26 11:16:30 +0200
commit12d9eddb516233de212434b329a35e114c387c5c (patch)
tree79b161c5787e98fc1b5bd60c764c59870d737bca /sonar-css-plugin/src/main/resources/org
parent7a31cb18a718601f31766cf8e02c6ad85f3916f0 (diff)
downloadsonar-css-12d9eddb516233de212434b329a35e114c387c5c.tar.bz2
Rule S4654: CSS properties should be valid
Diffstat (limited to 'sonar-css-plugin/src/main/resources/org')
-rw-r--r--sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.html22
-rw-r--r--sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.json16
-rw-r--r--sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json1
3 files changed, 39 insertions, 0 deletions
diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.html b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.html
new file mode 100644
index 0000000..18f759a
--- /dev/null
+++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.html
@@ -0,0 +1,22 @@
+<p>The W3C specifications define the valid CSS properties. Only the official and browser-specific properties should be used to get the expected impact
+in the final rendering.</p>
+<p>This rule ignores:</p>
+<p>- <code>$sass</code>, <code>@less</code>, and <code>var(--custom-property)</code> variable syntaxes.</p>
+<p>- vendor-prefixed properties (e.g., <code>-moz-align-self</code>, <code>-webkit-align-self</code>).</p>
+<h2>Noncompliant Code Example</h2>
+<pre>
+a {
+ colour: blue; // Noncompliant: colour is not part of the specifications
+}
+</pre>
+<h2>Compliant Solution</h2>
+<pre>
+a {
+ color: blue;
+}
+</pre>
+<h2>See</h2>
+<ul>
+ <li> https://github.com/known-css/known-css-properties#source </li>
+</ul>
+
diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.json
new file mode 100644
index 0000000..f466127
--- /dev/null
+++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4654.json
@@ -0,0 +1,16 @@
+{
+ "title": "CSS properties should be valid",
+ "type": "BUG",
+ "status": "ready",
+ "remediation": {
+ "func": "Constant\/Issue",
+ "constantCost": "5min"
+ },
+ "tags": [
+
+ ],
+ "defaultSeverity": "Blocker",
+ "ruleSpecification": "RSPEC-4654",
+ "sqKey": "S4654",
+ "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 d7ae454..5c03bb6 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
@@ -8,6 +8,7 @@
"S4649",
"S4652",
"S4653",
+ "S4654",
"S4655",
"S4656",
"S4658",