Frage

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.

War es hilfreich?

Lösung

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.

Andere Tipps

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

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.

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

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"
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top