rmuir commented on code in PR #14804: URL: https://github.com/apache/lucene/pull/14804#discussion_r2155458055
########## 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: we can always change it. that particular description is really cool too, because of how meta this PR is. By banning these wildcards, we can do more with these simple rules :) Just as an example, you could write unused import rule which would work correctly (if you wanted to), whereas with wildcards its not reasonable. -- 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