RFR: 8349847: Support configuring individual lint categories as errors [v13]

Vicente Romero vromero at openjdk.org
Tue Oct 7 18:54:41 UTC 2025


On Sun, 28 Sep 2025 18:53:35 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

>> This PR enhances the `-Werror` flag to support lint categories just like `-Xlint` does. For example `-Werror:all,-preview` would cause an error if any warning not in the `preview` lint category occurred.
>> 
>> The existing `-Xlint` flag has a particular behavior when conflicting flags are combined (e.g., `-Xlint:all -Xlint:none -Xlint:foo -Xlint:-foo` is equivalent to `-Xlint:all`). This behavior has been factored out and Javadocumented so that both `-Xlint` and `-Werror` can have this same "parsing" logic.
>> 
>> See the CSR [JDK-8350044](https://bugs.openjdk.org/browse/JDK-8350044) for details on how the new flag behaves in certain corner cases.
>
> Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits:
> 
>  - Merge branch 'master' into JDK-8349847 to fix conflicts.
>  - Reword the "--help-lint" trailing blurb to make it sound more friendly.
>  - Add trailing "--help-lint" blurb to clarify how category aliases are handled.
>  - Merge branch 'master' into JDK-8349847 to fix conflicts.
>  - Improve documentation per CSR review comments.
>  - Address review comments.
>  - Merge branch 'master' into JDK-8349847
>  - Merge branch 'master' into JDK-8349847 to fix cross-compiling build problem.
>  - Merge branch 'master' into JDK-8349847 to fix conflicts.
>  - Merge branch 'master' into JDK-8349847 to fix conflicts.
>  - ... and 11 more: https://git.openjdk.org/jdk/compare/9093d3a0...0599ab08

looks good

-------------

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23622#pullrequestreview-3311466789


More information about the compiler-dev mailing list