inspect.sh specify scope
Answered
How do I specify a scope for offline inspections using inspect.sh? I would like to exclude my test classes from the inspection.
Please sign in to leave a comment.
Scope can be specified inside profile, see https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000003564-Default-inspection-scope-.
Unfortunately there is still an open ticket for setting the scope for groups: https://youtrack.jetbrains.com/issue/IDEA-87933#u=1401303743011&tab=Comments
I can't change the scope for every single inspections, that would take forever.
See https://youtrack.jetbrains.com/issue/IDEA-135512. There is a VM option you can pass to the JVM to run inspections on specific scope.
OK. I created a file `inspect.vmoptions` and added `-Didea.analyze.scope=lint` with `lint` beeing my scope excluding the tests.
I call the script as follows and it works! It would be great to have a way to pass the VM options directly to the script.
```
export STUDIO_VM_OPTIONS=/path/to/inspect.vmoptions; /Applications/Android\ Studio.app/Contents/bin/inspect.sh ...
```