summaryrefslogtreecommitdiffstats
path: root/plugins/sonar-l10n-en-plugin/src
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-12-02 17:05:39 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-12-05 12:51:15 +0400
commit7faee383694f53a6baad3a1a88218c5f4f88578e (patch)
treec339165fffa429f232a092b3007c1aa4a036bdfa /plugins/sonar-l10n-en-plugin/src
parentee09f485818f4808fa7aff7c02969c972931a180 (diff)
downloadsonarqube-7faee383694f53a6baad3a1a88218c5f4f88578e.tar.gz
sonarqube-7faee383694f53a6baad3a1a88218c5f4f88578e.zip
SONAR-2018 Add rule to detect commented-out lines of code
Diffstat (limited to 'plugins/sonar-l10n-en-plugin/src')
-rw-r--r--plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava.properties2
-rw-r--r--plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava/CommentedOutCodeLine.html8
2 files changed, 10 insertions, 0 deletions
diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava.properties
index f26cabba546..c178b1b078c 100644
--- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava.properties
+++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava.properties
@@ -27,3 +27,5 @@ rule.squid.UndocumentedApi.param.forClasses=Optional. If this property is not de
rule.squid.UnusedPrivateMethod.name=Unused private method
rule.squid.UnusedProtectedMethod.name=Unused protected method
+
+rule.squid.CommentedOutCodeLine.name=Avoid commented-out lines of code
diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava/CommentedOutCodeLine.html b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava/CommentedOutCodeLine.html
new file mode 100644
index 00000000000..f5e5d238f24
--- /dev/null
+++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/squidjava/CommentedOutCodeLine.html
@@ -0,0 +1,8 @@
+<p>Here are the main reasons why commented code is a code smell :</p>
+<ul>
+ <li>It always raises more questions than it gives answers</li>
+ <li>Everybody will forget very quickly how relevant the commented code is</li>
+ <li>This is distraction when going down the code as it stops the flow of eyes</li>
+ <li>It is a bad SCM engine : Subversion, CVS and Git are really more trustworthy !</li>
+ <li>The simple fact of understanding why code was commented out in the first place can take a lot of time</li>
+</ul>