ottlinger commented on code in PR #257:
URL: https://github.com/apache/creadur-rat/pull/257#discussion_r1614883281


##########
apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java:
##########
@@ -339,79 +344,86 @@ public void log(Level level, String msg) {
     }
     
     protected ReportConfiguration getConfiguration() throws 
MojoExecutionException {
-        ReportConfiguration config = new ReportConfiguration(makeLog());
-        reportDeprecatedProcessing();
-        Defaults defaults = getDefaultsBuilder().build(config.getLog());
-        if (addDefaultLicenses) {
-            config.setFrom(defaults);
-        } else {
-            config.setStyleSheet(Defaults.getPlainStyleSheet());
-        }
+        DefaultLog.setInstance(makeLog());
+        try {
+            ReportConfiguration config = 
OptionCollection.parseCommands(args().toArray(new String[0]),
+                    o -> getLog().warn("Help option not supported"),
+                    true);
+            reportDeprecatedProcessing();
+            Defaults defaults = getDefaultsBuilder().build(config.getLog());
+            if (addDefaultLicenses) {
+                config.setFrom(defaults);
+            } else {
+                config.setStyleSheet(Defaults.getPlainStyleSheet());
+            }
 
-        if (additionalLicenseFiles != null) {
-            for (String licenseFile : additionalLicenseFiles) {
-                try {
-                    URL url = new File(licenseFile).toURI().toURL();
-                    Format fmt = Format.fromName(licenseFile);
-                    MatcherReader mReader = fmt.matcherReader();
-                    if (mReader != null) {
-                        mReader.addMatchers(url);
-                    }
-                    LicenseReader lReader = fmt.licenseReader();
-                    if (lReader != null) {
+            if (additionalLicenseFiles != null) {

Review Comment:
   Can you reformat this block? Github shows special characters/tabs?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to