RFR: 8349847: Support configuring individual lint categories as errors [v12]
Archie Cobbs
acobbs at openjdk.org
Fri Sep 5 16:15:48 UTC 2025
> 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 incrementally with one additional commit since the last revision:
Reword the "--help-lint" trailing blurb to make it sound more friendly.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23622/files
- new: https://git.openjdk.org/jdk/pull/23622/files/002c78ff..66dc9a1e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23622&range=11
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23622&range=10-11
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/23622.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23622/head:pull/23622
PR: https://git.openjdk.org/jdk/pull/23622
More information about the compiler-dev
mailing list