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.
Excludes Use this page to specify files and directories within your project that should not be passed to the compiler. In this field, the path to a file or directory to be excluded from compilation is shown. For a directory: select this option to exclude from compilation all the corresponding subdirectories.
Add a folder to the list of excluded paths in the Remote Host tool window From the main menu, choose Tools | Deployment | Browse Remote Host or View | Tool Windows | Remote Host. In the Remote Host tool window that opens, select the relevant server configuration from the list.
In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Build, Execution, Deployment| Compiler | Excludes.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With