Claudenw commented on code in PR #637:
URL: https://github.com/apache/creadur-rat/pull/637#discussion_r3325381366


##########
apache-rat-core/src/main/java/org/apache/rat/commandline/Arg.java:
##########
@@ -337,7 +420,17 @@ public enum Arg {
                     .desc("Reads <Expression> entries from a file. Entries 
will be excluded from processing.")
                     
.deprecated(DeprecatedAttributes.builder().setForRemoval(true).setSince("0.17")
                             
.setDescription(StdMsgs.useMsg("--input-include-file")).get())
-                    .build())),
+                    .build()),
+            (context, selected) -> {
+                try {
+                    File includeFileName = 
context.getCommandLine().getParsedOptionValue(selected);
+                    if (includeFileName != null) {
+                        
context.getConfiguration().addIncludedPatterns(ExclusionUtils.asIterable(includeFileName,
 "#"));

Review Comment:
   I changed it to read:
   
   ```
   INCLUDE_FILE(new OptionGroup()
               .addOption(Option.builder().longOpt("input-include-file")
                       .argName("File").hasArg().type(File.class)
                       .converter(Converters.FILE_CONVERTER)
                       .desc("Reads <Expression> entries from a file. Entries 
will override excluded files.")
                       .build())
               .addOption(Option.builder().longOpt("includes-file")
                       .argName("File").hasArg().type(File.class)
                       .converter(Converters.FILE_CONVERTER)
                       .desc("Reads <Expression> entries from a file. Entries 
will override excluded files.")
                       
.deprecated(DeprecatedAttributes.builder().setForRemoval(true).setSince("0.17")
                               
.setDescription(StdMsgs.useMsg("--input-include-file")).get())
                       .build()),
               (context, selected) -> {
                   try {
                       File includeFileName = 
context.getCommandLine().getParsedOptionValue(selected);
                       if (includeFileName != null) {
                           
context.getConfiguration().addIncludedPatterns(ExclusionUtils.asIterable(includeFileName,
 "#"));
                       }
                   } catch (Exception e) {
                       throw ConfigurationException.from(e);
                   }
               }),
   ```
   
   So I think the documentation will be correct.



-- 
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