rmuir commented on code in PR #14804:
URL: https://github.com/apache/lucene/pull/14804#discussion_r2155451618


##########
gradle/validation/ast-grep/rules/no-wildcard-imports.sg.yaml:
##########
@@ -0,0 +1,16 @@
+# yaml-language-server: 
$schema=https://raw.githubusercontent.com/ast-grep/ast-grep/refs/heads/main/schemas/java_rule.json
+id: wildcard-import-not-allowed
+language: java
+rule:
+  kind: asterisk
+  inside:
+    kind: import_declaration
+severity: error
+message: don't use wildcard imports
+note: please use full imports instead
+url: 
https://google.github.io/styleguide/javaguide.html?cl=head#s3.3.1-wildcard-imports

Review Comment:
   I can see pointing at the style guide, but as far as being practical, i 
wonder if we can name the file errorprone.yml and name the checks accordingly 
(e.g. `WildcardImport` and link to their 
https://errorprone.info/bugpattern/WildcardImport url. 
   
   It is just how i've been organizing them, after seeing others use similar 
approach. I also think the errorprone URL is more helpful to end-user in fixing 
such issues (specs are more difficult to read), but that's just me.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to