in apache-rat-tasks/src/main/java/org/apache/rat/anttasks/Help.java [78:119]
public void execute() {
org.apache.rat.help.Help helpObj = new org.apache.rat.help.Help(System.out) {
/**
* Print the usage to the specific PrintWriter.
* @param opts The defined options.
*/
public void printUsage(final Options opts) {
String syntax = "ant {target executing task <rat:help/>}";
AntHelpFormatter helpFormatter = new AntHelpFormatter();
helpFormatter.setOptPrefix("<");
helpFormatter.printHelp(writer, helpFormatter.getWidth(), syntax, AbstractHelp.header("Available options"), opts,
helpFormatter.getLeftPadding(), helpFormatter.getDescPadding(), header("Argument Types"));
String argumentPadding = printArgumentTypes();
writer.println(header("Standard Collections"));
for (StandardCollection sc : StandardCollection.values()) {
writer.format("%n<%s>%n", sc.name());
helpFormatter.printWrapped(writer, helpFormatter.getWidth(), helpFormatter.getLeftPadding() + HELP_PADDING + HELP_PADDING,
argumentPadding + sc.desc());
helpFormatter.printWrapped(writer, helpFormatter.getWidth(), helpFormatter.getLeftPadding() + HELP_PADDING + HELP_PADDING,
argumentPadding + "File patterns: " + (sc.patterns().isEmpty() ? "<none>" : String.join(", ", sc.patterns())));
helpFormatter.printWrapped(writer, helpFormatter.getWidth(), helpFormatter.getLeftPadding() + HELP_PADDING + HELP_PADDING,
argumentPadding + "Provides a path matcher: " + sc.hasStaticDocumentNameMatcher());
helpFormatter.printWrapped(writer, helpFormatter.getWidth(), helpFormatter.getLeftPadding() + HELP_PADDING + HELP_PADDING,
argumentPadding + "Provides a file processor: " + sc.fileProcessorBuilder().hasNext());
}
writer.println("\nA path matcher will match specific information about the file.");
writer.println("\nA file processor will process the associated \"ignore\" file for include and exclude directives");
writer.println(header("Notes"));
int idx = 1;
for (String note : NOTES) {
writer.format("%d. %s%n", idx++, note);
}
writer.flush();
}
};
helpObj.printUsage(Arg.getOptions());
}