How to disable inspections for specific file

Hi, does anyone know how to disable the inspections for a singular file?  I can't seem to figure this out.

Basically, jquery.js comes up with a number of inspection errors, and I want to disable the inspections for this file, but keep them on for everything else.

Best,
Adam
4
8 comments
Avatar
Permanently deleted user

Don't really understand why this change was made. But here's how you turn off inspections for a single file:

Open the file in question. Hover over the green checkmark at the upper right of the editor window. You should see "PHP: All Problems" (or some variation) as a link there. Click that and select "None", that will apply to the entire file (and just that file).

It's not clear that that's what it does, nor at all clear that Hector's feature got moved here, but once you get it it's easy to change.

 

 

13

Thanks for the... uh, hint! But if that's really the only way to do it, that's spectacularly bad UX! Stuff that appears on mouseover/hover is usually just a hint, and here it's the only way to access a certain setting?!

6
Click on the "Hector the Inspector" icon in the status bar and change the inspection level to Syntax. This will be remembered on a per-file basis.
2

So how do you disable inspections for 1 file only now?

Your inspections are seeing php as javascript and I want them to stop interfering, since they are wrong. 

Why make it so goddamn impossible to disable inspections? Why not add them to to light bulb for EVERYTHING. 






2
Avatar
Permanently deleted user
Awesome - thanks... I never noticed that little guy in the corner.
0

For what it’s worth, this method only disables the inspection-related highlighting that appears when the file in question is opened in the editor; it does not exclude the file from the analysis done by “Analyze: Inspect Code,” which is what I am trying to figure out how to do.

0

Hi, is the "Hector the Inspector" gone?

I'm unable to find it, I'm using:

PyCharm 2020.2 (Community Edition)
Build #PC-202.6397.98, built on July 27, 2020
Runtime version: 11.0.7+10-b944.20 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1974M
Cores: 4
Non-Bundled Plugins: codes.rudolph.idea.cfg, com.jetbrains.plugins.ini4idea

0

It's been replaced with the inspection widget in the top right corner of the editor.

0

Please sign in to leave a comment.