From 123fc5f64fb6a6c4222b0ba761f47939b2e159ef Mon Sep 17 00:00:00 2001 From: Ryan Gustafson Date: Wed, 28 May 2008 19:28:21 +0000 Subject: [PATCH] Update RuleSet writing documentation to mention <exclude-pattern>/<include-pattern>. git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6161 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/xdocs/howtomakearuleset.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pmd/xdocs/howtomakearuleset.xml b/pmd/xdocs/howtomakearuleset.xml index 9273191c16..9e4f5764ab 100644 --- a/pmd/xdocs/howtomakearuleset.xml +++ b/pmd/xdocs/howtomakearuleset.xml @@ -84,6 +84,28 @@ Say you want to pick specific rules from various rule sets and customize them. +]]> + + +

You can also exclude certain files from being processed by a ruleset using exclude patterns, + with an optional overriding include pattern. A file will be excluded from processing when there + is a matching exclude pattern, but no matching include pattern. Path separators in the source + file path are normalized to be the '/' character, so the same ruleset can be used on multiple + platforms transparently. Additionally, this exclude/include technique works regardless of how + PMD is used (e.g. command line, IDE, Ant), making it easier to keep application of your PMD + rules consistent throughout your environment. Here is an example:

+ + + My ruleset + .*/some/package/.* + .*/some/other/package/FunkyClassNamePrefix.* + .*/some/package/ButNotThisClass.* + ... ]]>