diff options
Diffstat (limited to 'sonar-css-plugin/src/main/resources')
3 files changed, 33 insertions, 0 deletions
diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4648.html b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4648.html new file mode 100644 index 0000000..02b3570 --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4648.html @@ -0,0 +1,16 @@ +<p>Having duplicated font names doesn't help to read the font declaration and may be an indicator the author of the line was not sure how to configure +it. This rule raises an issue when <code>font</code> or <code>font-family</code> properties contain a duplicated font name. This rule ignores +<code>$sass</code>, <code>@less</code>, and <code>var(--custom-property)</code> variable syntaxes.</p> +<h2>Noncompliant Code Example</h2> +<pre> +a { + font-family: 'Georgia', Georgia, serif; +} +</pre> +<h2>Compliant Solution</h2> +<pre> +a { + font-family: Georgia, serif; +} +</pre> + diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4648.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4648.json new file mode 100644 index 0000000..487ab8a --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4648.json @@ -0,0 +1,16 @@ +{ + "title": "Duplicated font names should be removed", + "type": "CODE_SMELL", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "1min" + }, + "tags": [ + + ], + "defaultSeverity": "Major", + "ruleSpecification": "RSPEC-4648", + "sqKey": "S4648", + "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 5fb55c0..64ab8d6 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 @@ -3,6 +3,7 @@ "ruleKeys": [ "S1128", "S4647", + "S4648", "S4649", "S4652", "S4653", |
