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
评论操作 固定链接
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
评论操作 固定链接
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
评论操作 固定链接

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
评论操作 固定链接

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.

 

 

7
评论操作 固定链接

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?!

5

请先登录再写评论。