Uploaded image for project: 'WINDUP - Red Hat Application Migration Toolkit'
  1. WINDUP - Red Hat Application Migration Toolkit
  2. WINDUP-1050

Prevent hint or classification duplication: <with-tag name="..."> or preventDuplication="..."

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major 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.

              Unassigned Unassigned
              ozizka_jira Ondrej Zizka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: