Option to mark warnings as errors
See original GitHub issueI’d love an option to mark error prone warnings as errors so that even warnings won’t get ignored.
While it is possible to do the following:
tasks.withType(JavaCompile) {
options.compilerArgs += [ '-Werror' ]
}
it does not really suffice since all warnings are then marked as errors. Another option would be for every error prone rule to increase the severity though this will get impossible to maintain.
Maybe it could be something as simple as -Xep:WarningsAsErrors
.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Warning Options (Using the GNU Compiler Collection (GCC))
Warnings are diagnostic messages that report constructions that are not inherently erroneous but that are risky or suggest there may have been an...
Read more >C# Compiler Options - errors and warnings - Microsoft Learn
C# Compiler Options for errors and warnings. These options suppress or enable warnings, and control warnings as errors.
Read more >visual studio - Warning as error - How to get rid of these
Each project in Visual Studio has a "treat warnings as errors" option. Go through each of your projects and change that setting:.
Read more >0.11 — Configuring your compiler: Warning and error levels
In most cases, warnings can be resolved either by fixing the issue the warning is pointing out, or by rewriting the line of...
Read more >4.8. Options to Request or Suppress Warnings - MIT
Warnings are diagnostic messages that report constructions which are not inherently erroneous but which are risky or suggest there may have been an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cushon wasn’t this implemented the other way around meaning that you can downgrade errors to warnings but not the other way around?
This sounds like a good idea to me. We’ve also received requests for a flag to enable all checks as warnings (even if they’re errors by default) in order to collect the full list of diagnostics for a codebase. I imagine the implementation of the two flags would be very similar.