aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-squid-java-plugin/test-resources
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-squid-java-plugin/test-resources
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-squid-java-plugin/test-resources')
-rw-r--r--plugins/sonar-squid-java-plugin/test-resources/rules/CommentedCode.java22
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);
+ }
+ */
+ }
+}