Skip to content

Commit

Permalink
HSEARCH-4574 Adjust JQAssistant rules around module-specific class na…
Browse files Browse the repository at this point in the history
…me prefixes

So that we can name new classes more freely in the following commits.
  • Loading branch information
yrodiere committed May 31, 2023
1 parent 8d1e8cc commit ad0f1bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build/jqassistant/rules.xml
Expand Up @@ -569,6 +569,7 @@
<requiresConcept refId="hsearch:Generated" />
<requiresConcept refId="hsearch:Main" />
<requiresConcept refId="hsearch:HibernateSearch" />
<requiresConcept refId="hsearch:Impl" />
<requiresConcept refId="hsearch:ArtifactMetadata" />
<description>
Main (non-test) types extending/implementing a Hibernate Search type from another module must have a module-specific keyword in their name,
Expand All @@ -578,8 +579,8 @@
- the misnamed type is an anonymous type or a generated type;
- or the misnamed type is deprecated;
- or the implemented type is deprecated;
- or the implementing type is an inner/nested type;
and its surrounding type does use the module-specific keyword;
- or the implementing type is an inner/nested type and is non-public (implementation) --
in which case only the surrounding type must comply, if relevant;
- or the implemented type is in a util module,
in which case the implemented interface may just be a detail.
</description>
Expand All @@ -599,7 +600,7 @@
AND NOT misnamedType:Generated
AND NOT (
misnamedType.nameWithoutContainingTypeName <> misnamedType.name
AND misnamedType.name =~ ("^(Abstract)?\\Q" + misnamedTypeArtifact.moduleSpecificKeyword + "\\E.*")
AND misnamedType:Impl
)
AND NOT externalParentTypeArtifact.name STARTS WITH "hibernate-search-util-"
RETURN misnamedTypeArtifact.moduleSpecificKeyword, misnamedType, externalParentType
Expand Down

0 comments on commit ad0f1bf

Please sign in to comment.