Add support for the new generate checks and file suppression option
This commit is contained in:
parent
f063889778
commit
def9be96f1
3 changed files with 29 additions and 0 deletions
|
@ -314,6 +314,25 @@ public class CheckstyleOperation extends AbstractProcessOperation<CheckstyleOper
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates to output a suppression xml that will have suppress elements with {@code checks} and {@code files}
|
||||
* attributes only to use to suppress all violations from user's config. Instead of printing every violation, all
|
||||
* violations will be catched and single suppressions xml file will be printed out. Used only with the
|
||||
* {@link #configurationFile(String) configurationFile} option. Output location can be
|
||||
* specified with the {@link #outputPath(String) output} option.
|
||||
*
|
||||
* @param generateChecksAndFileSuppression {@code true} or {@code false}
|
||||
* @return the checkstyle operation
|
||||
*/
|
||||
public CheckstyleOperation generateChecksAndFileSuppression(boolean generateChecksAndFileSuppression) {
|
||||
if (generateChecksAndFileSuppression) {
|
||||
options_.put("-G", "");
|
||||
} else {
|
||||
options_.remove("-G");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates to output a suppression xml to use to suppress all violations from user's config. Instead of printing
|
||||
* every violation, all violations will be caught and single suppressions xml file will be printed out.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue