-
Story
-
Resolution: Unresolved
-
Major
-
None
-
2.5.0.Final
-
None
-
None
*For discussion*
Sometimes it happens that a file satisfies multiple conditions of different rules.
These rules can't be merged because one may be a bit more fitting than the other.
On the other hand, when both match, the classification is basically duplicated.
For these cases, I suggest that we have a <with-tag> sub-condition for the <has-hint> and <has-classification> conditions.
<when> <xmlfile public-id=".*JBoss.+DTD Java EE.+5.*"/> <not> <has-classification> <with-tag name="jboss-eap"/> </has-classification> </not> </when>
An alternative, shorter than the above, could be:
<hint ... preventDuplication="line, any-tag"> ... <classification ... preventDuplication="title, all-tags"> ...
which would only apply the classification if it would not create a duplication in certain attributes of the classification.
The attributes to check for potential duplication would be:
- line - the same line already has a hint
- title - there already is a hint/classification with the same title
- any-tag - there already is a hint/classification which has any of the tags this new hint/classification would have.
- all-tags - there already is a hint/classification which has all of the tags this new hint/classification would have.
- relates to
-
WINDUP-1051 Implement <has-classification>, just like we have <has-hint>
- Closed