Cannot get idea.exclude.patterns to work
Hi
No matter what I try i cannot seem to get the TeamCity inspections to ignore/exclude directories. I followed the instructions on http://confluence.jetbrains.net/display/TCD6/Inspections.
Things i've tried:
- Various cominations of include/exclude properties
- The project does have intellij modules and i tried using those in the exclude patterns (eg. -Didea.exclude.patterns=[integration-test-module]/**) but this did not work either.
- I even upgraded from TeamCity 5 to 6 in the hope that it was a bug that has been fixed.
- Because include have precedence over exclude i tried -Didea.exclude.patterns=** -Didea.include.patterns=src/** but this resulted in no inspections running
All i'm trying to achieve is to have the inspections only run on our main production src code and exclude things like generated-src.
Any help on this would be greatly appreciated.
Cheers
Oliver
Project directory structure
+- .idea
+- acceptance
+- common-build
+- common-framework-module
+- data
+- entity-archive
+- ext
+- generated-src
+- integration-test-module
+- migrate
+- report-templates
+- src
+- support
+- target
+- test
+- tools
JVM command line parameters:
-Xmx768m -XX:MaxPermSize=160m -Didea.include.patterns=src/** -Didea.exclude.patterns=data/**;ext/**;generated-src/**;integration-test-module/**;migrate/**;support/**;tools/**
TeamCity:
Version 6.0.2 (build 15857)
Please sign in to leave a comment.
Hello Oliver,
Works here. Could you please try to use IDEA to prepare your exclude patterns: File|Settings|Scopes. There you can create scope from "exclude" directories: to prepare scope to be excluded you need to include recurcievly all but "src" root directory. Please paste here the result.
Thank you
Hi Anna,


Did you see that i'm talking about the exclude setting in TeamCity not in IntelliJ. I know about scopes in Intellij but they seem to have a completely different format to the ones described in team city (http://confluence.jetbrains.net/display/TCD6/Inspections).
I did try to create a scope in IntelliJ though but this does not seem to work as expected either.
Screenshot after selecting the directory "generated-src" and clicking the "exclude recursively" button. The pattern "!file:*/" excludes everything not just "generated-src".
Screenshot after selecting the directory "src" and clicking the "include recursively" button. This now seems to include everything
Please let me know if i'm misunderstanding something.
Cheers
Oliver
Hello Oliver,
sorry for the late response.
Seems that your problem is somehow related to http://youtrack.jetbrains.net/issue/TW-15138. We can't reproduce it though. Could you please tell which inspections still report errors on the excluded code (Seems that patterns are ok.)
Thank you