Skip to content

Commit

Permalink
HSEARCH-3649 Add an exception to a jqassistant rule
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Sep 3, 2019
1 parent 0bc5c66 commit 72d7926
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions jqassistant/rules.xml
Expand Up @@ -418,7 +418,7 @@
This allows to more easily understand which module a given type comes from.
Exceptions are allowed when:
- the misnamed type is an anonymous type, a generated type or a test type;
- or the misnamed type is an inner/nested type named "Builder" and its parent type does use the module-specific keyword;
- or the misnamed type is an inner/nested type named "(Abstract)?Builder" and its parent type does use the module-specific keyword;
- or the implemented type is in a util module,
in which case the implemented interface may just be a detail.
</description>
Expand All @@ -436,11 +436,10 @@
AND NOT misnamedType:Generated
AND NOT misnamedType:Test
AND NOT (
misnamedType.nameWithoutContainingTypeName = "Builder"
misnamedType.nameWithoutContainingTypeName =~ "^(Abstract)?Builder$"
AND misnamedType.name =~ ("^(Abstract)?\\Q" + misnamedTypeArtifact.moduleSpecificKeyword + "\\E.*")
)
AND NOT externalParentTypeArtifact.name STARTS WITH "hibernate-search-util-"
AND NOT externalParentTypeArtifact.name STARTS WITH "hibernate-search-util-"
RETURN misnamedTypeArtifact.moduleSpecificKeyword, misnamedType, externalParentType
]]></cypher>
</constraint>
Expand Down

0 comments on commit 72d7926

Please sign in to comment.