diff options
Diffstat (limited to 'sonar-css-plugin/src/main/resources/org')
3 files changed, 29 insertions, 0 deletions
diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S1128.html b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S1128.html new file mode 100644 index 0000000..8dde5aa --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S1128.html @@ -0,0 +1,12 @@ +<p>The imports part of a file should be handled by the Integrated Development Environment (IDE), not manually by the developer.</p> +<p>Unused and useless imports should not occur if that is the case.</p> +<p>Leaving them in reduces the code's readability, since their presence can be confusing.</p> +<h2>Noncompliant Code Example</h2> +<pre> +@import 'a.css'; +@import 'a.css'; // Noncompliant + +@import url("a.css"); +@import url("a.css"); // Noncompliant +</pre> + diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S1128.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S1128.json new file mode 100644 index 0000000..1f7d8bc --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S1128.json @@ -0,0 +1,16 @@ +{ +  "title": "Useless imports should be removed", +  "type": "CODE_SMELL", +  "status": "ready", +  "remediation": { +    "func": "Constant\/Issue", +    "constantCost": "2min" +  }, +  "tags": [ +    "unused" +  ], +  "defaultSeverity": "Minor", +  "ruleSpecification": "RSPEC-1128", +  "sqKey": "S1128", +  "scope": "All" +} 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 14b9668..4455af6 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": [ +    "S1128",      "S4647",      "S4652",      "S4653",  | 
