Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] - Make all warnings errors #1589

Closed
C-Otto opened this issue Apr 25, 2020 · 3 comments
Closed

[Feature Request] - Make all warnings errors #1589

C-Otto opened this issue Apr 25, 2020 · 3 comments

Comments

@C-Otto
Copy link
Contributor

C-Otto commented Apr 25, 2020

I'd like to fail my build if Error Prone finds a warning in my code. Then, I'm forced to fix the code, or suppress the warning. I'm aware of false positives, and I'm happy to take the risk.

Please have a look at #614 for more information (feel free to re-open and continue there).

@tbroyer
Copy link
Contributor

tbroyer commented Apr 25, 2020

Do you use -Werror? Works great for me.

@C-Otto
Copy link
Contributor Author

C-Otto commented Apr 25, 2020

Thanks, didn't know about that (see Twitter).

@C-Otto C-Otto closed this as completed Apr 25, 2020
@C-Otto
Copy link
Contributor Author

C-Otto commented Apr 25, 2020

tasks.withType(JavaCompile) {
    options.compilerArgs << "-Werror"
}

or

compileJava {
    options.compilerArgs << "-Werror"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants