diff --git a/docs/config.html b/docs/config.html index 9a846b895..f203dd8c0 100644 --- a/docs/config.html +++ b/docs/config.html @@ -129,7 +129,7 @@ Checkstyle applies packages com.puppycrawl.tools.checkstyle and - com.puppycrawl.tools.checkstyle.checks by default. You can also specify other + com.puppycrawl.tools.checkstyle.checks by default. You can specify other packages in a package names XML document when you invoke Checkstyle at the command line, and when you run a Checkstyle task in ant. @@ -309,7 +309,8 @@ com.puppycrawl.tools.checkstyle.checks. To specify other packages to apply, create a package names XML document in a file, and provide that file as a command line option or as a - property of an ant Checkstyle task. + attribute of an ant Checkstyle task. + This is useful for integrating other modules in your configuration.
A package names XML document specifies a list of package names. Here is the root of the @@ -329,6 +330,34 @@ package element is a subpackage of its parent package element.
++ For example, to incorporate modules from package com.mycompany.checks + with Checkstyle modules, create the XML file below and specify that file as a + command line option or as a + attribute of an ant Checkstyle task.: +
++<?xml version="1.0" encoding="UTF-8"?> + + <!DOCTYPE checkstyle-packages PUBLIC + "-//Puppy Crawl//DTD Package Names 1.0//EN" + "http://www.puppycrawl.com/dtds/packages_1_0.dtd"> + +<checkstyle-packages> + <package name="com.mycompany.checks"> + <package name="com.puppycrawl.tools.checkstyle"> + <package name="checks"/> + </package> +</checkstyle-packages> ++
+ Now you can configure a module of package com.mycompany.checks, + say com.mycompany.checks.MethodLimitCheck, with a shortened + module element in the configuration document: +
++ <module name="MethodLimit"/> +