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
7 comments
Comment actions Permalink
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
Comment actions Permalink
Awesome - thanks... I never noticed that little guy in the corner.
0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

-1
Comment actions Permalink

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. 






1
Comment actions Permalink

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.

 

 

0

Please sign in to leave a comment.