question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to mark warnings as errors

See original GitHub issue

I’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:open
  • Created 7 years ago
  • Reactions:3
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
vanniktechcommented, Jan 16, 2017

@cushon wasn’t this implemented the other way around meaning that you can downgrade errors to warnings but not the other way around?

5reactions
cushoncommented, Jul 13, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found