rmuir commented on code in PR #14812: URL: https://github.com/apache/lucene/pull/14812#discussion_r2156621252
########## gradle/validation/ast-grep/rules/java-patterns.yml: ########## @@ -0,0 +1,24 @@ +# Banned Lucene source patterns +# Historically implemented as regexes which are more difficult +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ast-grep/ast-grep/refs/heads/main/schemas/java_rule.json +id: java-lang-import +language: java +rule: + pattern: import java.lang.$REF + kind: import_declaration +fix: "" +severity: error +message: unnecessary import of `$REF` from java.lang +note: classes in java.lang are implicitly imported +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ast-grep/ast-grep/refs/heads/main/schemas/java_rule.json +id: impossible-type-inference +language: java +# does the javac compiler allow this? did it ever? +rule: + pattern: var $$$ = new $$$<>($$$) + kind: local_variable_declaration Review Comment: I understand your explanation: I removed the TODO and renamed rule from "impossible" to "confusing" :) -- 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