Search code examples
intellij-idea

Disable IntelliJ Warnings


It really annoys me that IntelliJ highlights certain 'errors' (that don't prevent successful compilation) the same way that real errors are highlighted. For example, a magic number is not really an error, but it will be flagged in exactly the same way as an incompatible type error.

How can I change this?


Solution

  • Go to Settings -> Inspections. Then you need to search through the long list for the offending inspection, which you can get the name of by hovering on the warning marker in the margin. You can change the severity of the inspection, whether it's an error, warning, etc. or just disable it altogether.

    Edit: if you search for "magic" in Settings, you get the following, which should be helpful:

    enter image description here