Skip to content

error: invalid flag: -XepAllErrorsAsWarnings #89

Answered by tbroyer
vivian196167 asked this question in Q&A
Discussion options

You must be logged in to vote

-XepAllErrorsAsWarnings is not a compiler argument, it's an Error Prone argument (to be passed whitespace-separated as part of the -Xplugin:ErrorProne compiler argument); but you shouldn't have to use it when using the plugin (that's the whole idea).

Your build script should read:

tasks.withType(JavaCompile).configureEach {
  options.errorprone {
    disableWarningsInGeneratedCode = true
    allErrorsAsWarnings = true
    // disable("ParameterName", "CatchFail")
  }
}

(i.e. you shouldn't even need the CheckSeverity enum)

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tbroyer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #88 on August 30, 2023 08:46.