How do I suppress errors in IntelliJ Idea 12
Asked Answered
C

5

6

I have lots of errors regarding background images in css. This is because deployment relative paths will be different from my dev environment.

These are inconsequential errors that I know I can't do anything about. I would like to turn off checking for this so that real errors are noticeable again.

I checked in the settings and project structure and didn't see anything promising, but I can't help thinking i read about how to do this somewhere before.

Collector answered 26/2, 2013 at 19:48 Comment(2)
Alt+Enter, right arrow menu on the highlighted code provides quick access to the inspection settings and suppression options.Andras
I've got a really stupid one that I can't supress because if it was correct it would be a really serious error: 'setScene(javafx.scene.Scene)' in 'jfxtras.styles.jmetro.JMetro' cannot be applied to '(javafx.scene.Scene)' It compiles just fine, but IDEA thinks its an error because , uh , it requires javafx.scene.Scene but instead is getting javafx.scene.Scene. Yeah that definately is as daft as it reads, and absolutely the IDE faulting , not my code (as I said, the code compiles)Martell
C
6

Found a potential answer while writing the question: Menu--> Analyze - analyze a document that has the unwanted error flagged. Then in Inspection Results, click the wrench and uncheck the Inspection you do not want to run. In my case this was under CSS, uncheck Unknown file or directory.

I also noticed this icon of a guy wearing a bowler hat with his back to you (wow) that, when clicked, can turn off redlining for a very specific error instance. This appears to also apply to any other document in the project with the same exact error. That's a bonus since I know the paths that are supposed to be used and just turn the error off for them and detect incorrect paths in my strange dev setup.

Collector answered 26/2, 2013 at 19:48 Comment(0)
G
4

you can right click the file and mark as plain text. useful for third part css/js lib. :)

Gardener answered 16/4, 2016 at 15:1 Comment(0)
N
2

if you're annoyed by the red path before your css file, just close it, and restart the intelliJ. intellij sometimes doesn't recognize css code, so don't worry about it.

Niue answered 13/11, 2013 at 9:13 Comment(0)
E
1

For me, I wanted to exclude the folder. So mark directory as exclude, then need to restart editor.

Epizoic answered 12/11, 2014 at 19:44 Comment(0)
P
1

In version 2020.3 the bowler hat guy is gone (some posts mention Hector the inspector). Instead do this:

Select the file

Analyze --> Configure Current File Analysis... -->
    Highlighting Level for myfile.foo --> Check "None"
Paramnesia answered 18/12, 2020 at 13:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.