As far as I know, the only way to exclude a directory is to mark it as excluded in project structure. However, this would make IntelliJ totally ignore the directory. Thus it will not appear in autocomplete options.
I do not want this. I want exclusion from inspections but inclusion in everything else. Is this possible?
I'm using Intellij 12.0.2. And, it's actually the bootstrap css and js failing the inspection.
As suggested by Peter Lawrey, the proper solution would be to use the custom inspection scope that excludes the directories where you don't want the inspections to be run.
With IntelliJ 15, you can mark the directory as
Generated Sources Root
. This skips the inspections but auto-complete will still work.Mark Directory As
/Generated Sources Root
NB: It seems, that you cannot select this type in the
Project Structure
dialogue, only via the right click.There is man in a hat in status bar. Click on it and select inspection level.
Also, if you have many files you want to supress inspection, then go to
.idea
and editworkspace.xml
, find<component name="HighlightingSettingsPerFile">
and add line like this:I find it simplier than editing inspection levels.