aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-css-plugin/src/main/resources/org
diff options
context:
space:
mode:
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"
]
}