Don't apply IntelliJ illegal module dependency inspection to test code (#101977)

We don't enforce Java modularity when executing tests, so we shouldn't
bother highlighting issues in test framework code. This PR adds a new
IntelliJ scope that excludes everything under `:test` and configures the
illegal module dependency inspection to use this new scope.
This commit is contained in:
Mark Vieira 2023-11-09 09:46:18 -08:00 committed by GitHub
parent d6a2db6230
commit 520e118561
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -2,12 +2,13 @@
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="GroovyPointlessBoolean" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="IllegalDependencyOnInternalPackage" enabled="true" level="ERROR" enabled_by_default="false">
<scope name="Production" level="ERROR" enabled="false" />
<scope name="Production minus fixtures" level="ERROR" enabled="true" />
</inspection_tool>
<inspection_tool class="PointlessBooleanExpression" enabled="false" level="WARNING" enabled_by_default="false">
<option name="m_ignoreExpressionsContainingConstants" value="true" />
</inspection_tool>
<inspection_tool class="jol" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="IllegalDependencyOnInternalPackage" enabled="true" level="ERROR" enabled_by_default="false">
<scope name="Production" level="ERROR" enabled="true" />
</inspection_tool>
</profile>
</component>

View file

@ -0,0 +1,3 @@
<component name="DependencyValidationManager">
<scope name="Production minus fixtures" pattern="src:*..*&amp;&amp;!file[elasticsearch.test*]:*//*" />
</component>