Skip to content

[REQ][Java] Update the build to verify generated Java code passes common linters #24746

Description

@anthonyvdotbe

Is your feature request related to a problem? Please describe.

There are plenty of issues raised, where generated code fails to compile with common linters, e.g., javac -Xlint:all -Werror. This forces consumers to add workarounds, such as using separate javac invocations or disabling certain lint checks for the entire project.

Describe the solution you'd like

The build of this project attempts to compile all Java samples with all linters (at least the very common ones, i.e., javac, javadoc, Error Prone, NullAway, and Checkstyle). This would prevent new violations from finding their way into the project.

Describe alternatives you've considered

Retain the status quo and have users report violations instead. This is problematic because users will often not bother to report issues and when they do, they will often not have the knowledge to contribute a fix. Whereas if the required checks would be done at the moment a PR is created, it's often trivial for the author of the PR to fix any violations.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions