[ 
https://issues.apache.org/jira/browse/RAT-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17806546#comment-17806546
 ] 

ASF subversion and git services commented on RAT-346:
-----------------------------------------------------

Commit 1cdd21fdd77d9bca2c3d93d09563345c031895ef in creadur-rat's branch 
refs/heads/master from P. Ottlinger
[ https://gitbox.apache.org/repos/asf?p=creadur-rat.git;h=1cdd21fd ]

Merge pull request #195 from Claudenw/RAT-346_warn_on_duplicate_license_family

RAT-346: warn on duplicate license family

> WARN in case user defined License family has the same name as existing one
> --------------------------------------------------------------------------
>
>                 Key: RAT-346
>                 URL: https://issues.apache.org/jira/browse/RAT-346
>             Project: Apache Rat
>          Issue Type: Improvement
>          Components: scan
>    Affects Versions: 0.16
>            Reporter: Claude Warren
>            Assignee: Claude Warren
>            Priority: Major
>             Fix For: 0.16.1
>
>
> Could you please raise WARN in case user defined License family has the same 
> name as internal one?
> It seems user defined one is `just ignored` in such caseĀ :(
> h2. Architecture remark
> I removed the API module because it consisted of a) class files that were not 
> being used in the code but that were misleading in name; and more importantly 
> b) because there were a number of test cases that would have been converted 
> to Junit5 only to be removed again later.
> The harmonization is not necessarily the use of a single API module but 
> rather that the options in each of the UIs should be similarly constructed 
> (same basic phrasing) not have 2 UIs where one says 
> "--enable-default-licenses" (default off) and the other says 
> "--disable-default-licenses" (default on). Also there are options that have 
> been added to one UI that are general in nature (i.e. not part of managing 
> the specific platform the UI is on) and are not available in the other UIs.
> I will remove the commented out code. I should have before I submitted this 
> pull request, but skipped it in favor of getting this code change infront of 
> more eyes quickly.
> I also have to make a pass to update javadocs.
> @jbonofre Most of the changes in this request are the migration to Junit 5. 
> The significant changes are the creation of the classes in the o.a.r..utils 
> directory, the addition of methods to set the associated properties in 
> ReportConfiguration along with the tests for those classes and changes.
> The request was to warn on duplication so the solution submitted does the 
> following:
>     Creates a ReportingSet class that is a SortedSet implementation (wrapping 
> and delegating to a SortedSet). it intercepts the calls to add and addAll to 
> determine if the new elements are already in the set and take an action.
>   * If logging is enabled (not set to None on the very thing logging wrapper 
> Log) write a message about the collision to the log at the specific level.
>   * If the internal action (ReportingSet.Option) is set to IGNORE the change 
> is ignored, OVERWRITE the old entry is replaced, FAIL an exception is thrown.
> Finally the ReportingSet has an instance variable called duplicateFmt that is 
> a Function<T,String> that produces the information to display in the message.
> The change to ReportConfiguration are to use ReportingSet to contain the 
> Licenses and LicenseFamilies, and supporting methods to configure (as noted 
> above).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to