This is an automated email from the ASF dual-hosted git repository. olamy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git
The following commit(s) were added to refs/heads/master by this push: new 84c5649 [MPMD-272] Support ignoreAnnotations options for CPD 84c5649 is described below commit 84c56491c0f2ad37b1df5e522e4623e67262e8de Author: olivier lamy <ol...@apache.org> AuthorDate: Sun Oct 14 22:21:38 2018 +1000 [MPMD-272] Support ignoreAnnotations options for CPD Signed-off-by: olivier lamy <ol...@apache.org> --- src/main/java/org/apache/maven/plugins/pmd/CpdReport.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java b/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java index 99ddb34..9a1037c 100644 --- a/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java +++ b/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java @@ -108,6 +108,14 @@ public class CpdReport @Parameter( property = "cpd.ignoreIdentifiers", defaultValue = "false" ) private boolean ignoreIdentifiers; + /** + * If true, CPD ignores annotations. + * + * @since 3.11.0 + */ + @Parameter( property = "cpd.ignoreAnnotations", defaultValue = "false" ) + private boolean ignoreAnnotations; + /** The CPD instance used to analyze the files. Will itself collect the duplicated code matches. */ private CPD cpd; @@ -242,7 +250,10 @@ public class CpdReport { p.setProperty( JavaTokenizer.IGNORE_IDENTIFIERS, "true" ); } - + if ( ignoreAnnotations ) + { + p.setProperty( JavaTokenizer.IGNORE_ANNOTATIONS, "true" ); + } try { if ( filesToProcess == null )