rmuir commented on code in PR #14849: URL: https://github.com/apache/lucene/pull/14849#discussion_r2168046452
########## gradle/validation/ast-grep/rules/java-patterns.yml: ########## @@ -21,3 +21,25 @@ rule: severity: error message: illegal use of `var` keyword with generic instance creation note: add explicit typing on the RHS when using `var` +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ast-grep/ast-grep/refs/heads/main/schemas/java_rule.json +id: javadoc-style-license-header +language: java +rule: + matches: java-license + regex: "^/[*][*]" +severity: error +message: license should be a non-javadoc block comment +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ast-grep/ast-grep/refs/heads/main/schemas/java_rule.json +id: license-after-package +language: java +rule: + kind: package_declaration + precedes: + matches: java-license +ignores: + # TODO: something not right with regeneration of this lone file + - "**/StandardSyntaxParser.java" Review Comment: I TODO'd this one because I feel like something didn't work correctly with `regenerate` ? As you can see, it has a `package` statement before the license header. But it is the only JavaCC file like this, so something seems off: https://github.com/apache/lucene/blob/4b47fb1a3113d22bca6cd8c1664529ef2d7f4877/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java#L3-L20 -- 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