aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-css-plugin/src/main/resources/org
diff options
context:
space:
mode:
authorAmaury Levé2018-06-25 14:31:23 +0200
committerElena Vilchik2018-06-26 11:49:59 +0200
commitad92bb6746b5b29ce41f91f7aa6dc2bb8195fa07 (patch)
tree7f40cf87f1a58430f8f22e90d3d85ffb1463cbdb /sonar-css-plugin/src/main/resources/org
parente78f845d7f25952cd5703296455e4e4825d9ec8e (diff)
downloadsonar-css-ad92bb6746b5b29ce41f91f7aa6dc2bb8195fa07.tar.bz2
Rule S4666: Selectors should not be duplicated
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/S4666.html14
-rw-r--r--sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4666.json16
-rw-r--r--sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json1
3 files changed, 31 insertions, 0 deletions
diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4666.html b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4666.html
new file mode 100644
index 0000000..9521f64
--- /dev/null
+++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4666.html
@@ -0,0 +1,14 @@
+<p>When a selector appears more than once in a statement, this is not a bug but probably a mistake that reduces the readability of the source code.
+Therefore, selectors should not be duplicated.</p>
+<h2>Noncompliant Code Example</h2>
+<pre>
+.foo,
+.bar,
+.foo {}
+</pre>
+<h2>Compliant Solution</h2>
+<pre>
+.bar,
+.foo {}
+</pre>
+
diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4666.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4666.json
new file mode 100644
index 0000000..f8be3d1
--- /dev/null
+++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4666.json
@@ -0,0 +1,16 @@
+{
+ "title": "Selectors should not be duplicated",
+ "type": "CODE_SMELL",
+ "status": "ready",
+ "remediation": {
+ "func": "Constant\/Issue",
+ "constantCost": "1min"
+ },
+ "tags": [
+
+ ],
+ "defaultSeverity": "Minor",
+ "ruleSpecification": "RSPEC-4666",
+ "sqKey": "S4666",
+ "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 aa28914..079c18c 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
@@ -14,6 +14,7 @@
"S4657",
"S4658",
"S4663",
+ "S4666",
"S4667"
]
}