diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-12-02 17:05:39 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-12-05 12:51:15 +0400 |
commit | 7faee383694f53a6baad3a1a88218c5f4f88578e (patch) | |
tree | c339165fffa429f232a092b3007c1aa4a036bdfa /plugins/sonar-squid-java-plugin/test-resources | |
parent | ee09f485818f4808fa7aff7c02969c972931a180 (diff) | |
download | sonarqube-7faee383694f53a6baad3a1a88218c5f4f88578e.tar.gz sonarqube-7faee383694f53a6baad3a1a88218c5f4f88578e.zip |
SONAR-2018 Add rule to detect commented-out lines of code
Diffstat (limited to 'plugins/sonar-squid-java-plugin/test-resources')
-rw-r--r-- | plugins/sonar-squid-java-plugin/test-resources/rules/CommentedCode.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/sonar-squid-java-plugin/test-resources/rules/CommentedCode.java b/plugins/sonar-squid-java-plugin/test-resources/rules/CommentedCode.java new file mode 100644 index 00000000000..0a44bc77d2a --- /dev/null +++ b/plugins/sonar-squid-java-plugin/test-resources/rules/CommentedCode.java @@ -0,0 +1,22 @@ +public class CommentedCode { + public CommentedCode() { + //This is a comment + //if (true) { + int i = 2; + } + + /** + * No detection of commented code line in Javadoc bloc + * + * public void main(){ + * + * } + */ + public void analyse() { + /* + for(Visitor visitor : visitors){ + visitor.scan(line); + } + */ + } +} |