Exclude one or more directory from inspection

I've some recurring inspection issues caused by third part javascript and php libraries (e.g. TinyMCE, jquery, etc.).
I'd like to set PhpStorm in order to ignore files and/or directories, so I can get issues that actually applies to my own code and not code that I won't change anyway, even if contains actual issue.

How can I do this?

6 comments

Hi Andrea,

Since I do not know what exact problems you are facing there, have a look at this (how to exclude certain directories for certain inspections): http://devnet.jetbrains.com/message/5465511

0

Hello Andriy,

Thank you for the link. This almost answer my needs, however, with this solution I'm forced to manually apply the scope to each kind of inspection: this is quite a tedious job.
Instead what I want to disable it to any kind of inspection, for a specific scope: is this possible?

For instance, I'd like to simply right click to a directory or a file and select: disable inspection for this directory/file.

0

AFAIK -- currently it is not possible.

There are multiple tickets with different ideas in this regard already (in both PhpStorm and platform-wide issue trackers -- search for "inspection exclude" sort of keywords and vote) .. but I do not think that devs will work on it for v6. Hopefully we will see it in v7 or 6.x (considering that such requests appearing from time to time -- more votes higher the chance .. at least in theory).

My only idea -- place such code not under project directly .. but under External Libraries (Settings | PHP | Include paths) -- may work for PHP  (sorry, once again -- I do not know what kind of issues you are facing).

0

As per the specific issue, I'm facing inspection issues with jquery, jquery-ui (both js and css), tinymce and other libraries.

I've tried to use as much as I could hosted libraries and enabled them from JavaScript -> Libraries, but some of them aren't included and/or aren't hosted externally, neither I can set them ad external libraries, as they must be included in the project anyway.

I hope this feature will get implemented as this issue causes me a lot of inspection messages that are useless to me and since PhpStorm/WebStorm is supposed to ease developer's job, this is against that "rule".

I'll add my vote to the issue, hoping they are linked and that is worth something (had experience with other JetBrains procuts requests that got many votes in the latest years (sic!) and are still ignored).

Thank you anyway.

0

To easy your pain of doing this for each inspection -- you can right click on actual group and it will create the same rule for each inspection, then you just need to quickly run trough each inspection and disable it for that scope -- quite fast, actually -- 1-2 mins total, I'd say (check boxes are visible).

0

Please sign in to leave a comment.