Skip to content

Add new configuration knob <failAfterWarning> that's not "fail fast" #1051

@archiecobbs

Description

@archiecobbs

New feature, improvement proposal

Setting <failOnWarning>true</failOnWarning>, which simply adds the -Werror flag, is documented as "Indicates whether the build will continue even if there are compilation warnings", which is accurate.

However, it would be nice if there were a version of this setting that implemented a slightly different behavior: "Indicates whether the build will fail if there are compilation warnings".

In other words, sometimes you want the build to fail if there are any warnings but you also want the compiler to spit out ALL of those warnings before it stops (i.e., complete the entire compilation process regardless) so you can deal with them all at once, instead of warning-by-warning.

That's not the behavior that -Werror provides; instead it is "fail fast" literally treating warnings like errors. Instead this proposed new option would only work when the plugin is using the javax.tools API (because there is no equivalent javac command line flag) and it would use a DiagnosticListener to track if there were warnings generated, etc.

But this would be a nice feature, perhaps call it <failAfterWarning>true</failAfterWarning> or somesuch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions