This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/cassandra-simulator.git

commit d9e5b410a0266575842809f51d838b64c680e97b
Author: Alex Petrov <[email protected]>
AuthorDate: Mon Jul 27 10:18:33 2026 +0200

    Add semgrep rule for tags in comments
---
 .semgrep.yml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/.semgrep.yml b/.semgrep.yml
index aec01fe..b0dbe93 100644
--- a/.semgrep.yml
+++ b/.semgrep.yml
@@ -15,3 +15,21 @@ rules:
       | "(?:\\.|[^"\\\r\n])*"(*SKIP)(*F)
       | '(?:\\.|[^'\\\r\n])*'(*SKIP)(*F)
       | (?P<FQN>\b(?:[a-z_][A-Za-z0-9_$]*\.)+[A-Z][A-Za-z0-9_$]*\b)
+
+  - id: java.no-html-tags-in-comments
+    languages: [java]
+    severity: ERROR
+    message: Use plain text and Javadoc inline tags instead of HTML tags in 
comments.
+    paths:
+      include:
+        - "**/src/**/*.java"
+    pattern-regex: |-
+      (?mix)
+      """(?s:.*?)"""(*SKIP)(*F)
+      | "(?:\\.|[^"\\\r\n])*"(*SKIP)(*F)
+      | '(?:\\.|[^'\\\r\n])*'(*SKIP)(*F)
+      | (?P<HTML_COMMENT>
+          
//[^\r\n]*</?(?:a|b|blockquote|br|code|dd|div|dl|dt|em|h[1-6]|hr|html|i|img|kbd|li|ol|p|pre|samp|span|strong|sub|sup|table|tbody|td|tfoot|th|thead|tr|ul|var)\b[^>\r\n]*>
+          |
+          
/\*(?s:(?:(?!\*/).)*?</?(?:a|b|blockquote|br|code|dd|div|dl|dt|em|h[1-6]|hr|html|i|img|kbd|li|ol|p|pre|samp|span|strong|sub|sup|table|tbody|td|tfoot|th|thead|tr|ul|var)\b[^>]*>)
+        )


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to