diff options
Diffstat (limited to 'thirdparty/checkstyle/site/anttask.html')
-rwxr-xr-x | thirdparty/checkstyle/site/anttask.html | 640 |
1 files changed, 640 insertions, 0 deletions
diff --git a/thirdparty/checkstyle/site/anttask.html b/thirdparty/checkstyle/site/anttask.html new file mode 100755 index 000000000..2968bfec7 --- /dev/null +++ b/thirdparty/checkstyle/site/anttask.html @@ -0,0 +1,640 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>checkstyle - Ant Task</title>
+ <style type="text/css" media="all">
+ @import url("./css/maven-base.css");
+ @import url("./css/maven-theme.css");
+ @import url("./css/site.css");
+ </style>
+ <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+ <meta name="author" content="Oliver Burn" />
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ </head>
+ <body class="composite">
+ <div id="banner">
+ <span id="bannerLeft">
+
+ Checkstyle 5.3
+
+ </span>
+ <a href="" id="bannerRight">
+
+ <img src="images/logo.png" alt="Checkstyle" />
+
+ </a>
+ <div class="clear">
+ <hr/>
+ </div>
+ </div>
+ <div id="breadcrumbs">
+
+
+
+
+
+
+
+
+ <div class="xleft">
+ Last Published: 2010-10-19
+ </div>
+ <div class="xright">
+
+
+
+
+
+
+
+ </div>
+ <div class="clear">
+ <hr/>
+ </div>
+ </div>
+ <div id="leftColumn">
+ <div id="navcolumn">
+
+
+
+
+
+
+
+
+ <h5>About</h5>
+ <ul>
+
+ <li class="none">
+ <a href="index.html">Checkstyle</a>
+ </li>
+
+ <li class="none">
+ <a href="releasenotes.html">Release Notes</a>
+ </li>
+ </ul>
+ <h5>Documentation</h5>
+ <ul>
+
+
+
+
+
+ <li class="expanded">
+ <a href="config.html">Configuration</a>
+ <ul>
+
+ <li class="none">
+ <a href="property_types.html">Property Types</a>
+ </li>
+ </ul>
+ </li>
+
+
+
+
+
+
+
+ <li class="expanded">
+ <a href="running.html">Running</a>
+ <ul>
+
+ <li class="none">
+ <strong>Ant Task</strong>
+ </li>
+
+ <li class="none">
+ <a href="cmdline.html">Command Line</a>
+ </li>
+ </ul>
+ </li>
+
+ <li class="none">
+ <a href="availablechecks.html">Available Checks</a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li class="expanded">
+ <a href="checks.html">Standard Checks</a>
+ <ul>
+
+ <li class="none">
+ <a href="config_annotation.html">Annotations</a>
+ </li>
+
+ <li class="none">
+ <a href="config_blocks.html">Block Checks</a>
+ </li>
+
+ <li class="none">
+ <a href="config_design.html">Class Design</a>
+ </li>
+
+ <li class="none">
+ <a href="config_coding.html">Coding</a>
+ </li>
+
+ <li class="none">
+ <a href="config_duplicates.html">Duplicate Code</a>
+ </li>
+
+ <li class="none">
+ <a href="config_header.html">Headers</a>
+ </li>
+
+ <li class="none">
+ <a href="config_imports.html">Imports</a>
+ </li>
+
+ <li class="none">
+ <a href="config_javadoc.html">Javadoc Comments</a>
+ </li>
+
+ <li class="none">
+ <a href="config_metrics.html">Metrics</a>
+ </li>
+
+ <li class="none">
+ <a href="config_misc.html">Miscellaneous</a>
+ </li>
+
+ <li class="none">
+ <a href="config_modifier.html">Modifiers</a>
+ </li>
+
+ <li class="none">
+ <a href="config_naming.html">Naming Conventions</a>
+ </li>
+
+ <li class="none">
+ <a href="config_regexp.html">Regexp</a>
+ </li>
+
+ <li class="none">
+ <a href="config_sizes.html">Size Violations</a>
+ </li>
+
+ <li class="none">
+ <a href="config_whitespace.html">Whitespace</a>
+ </li>
+ </ul>
+ </li>
+
+
+
+
+
+
+
+
+
+ <li class="expanded">
+ <a href="extending.html">Extending Checkstyle</a>
+ <ul>
+
+ <li class="none">
+ <a href="writingchecks.html">Writing checks</a>
+ </li>
+
+ <li class="none">
+ <a href="writingfilters.html">Writing filters</a>
+ </li>
+
+ <li class="none">
+ <a href="writinglisteners.html">Writing listeners</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <h5>Developers</h5>
+ <ul>
+
+ <li class="none">
+ <a href="apidocs/index.html">Javadoc</a>
+ </li>
+
+ <li class="none">
+ <a href="http://sourceforge.net/projects/checkstyle" class="externalLink">Project Page</a>
+ </li>
+
+ <li class="none">
+ <a href="contributing.html">Contributing</a>
+ </li>
+ </ul>
+ <h5>Project Documentation</h5>
+ <ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li class="collapsed">
+ <a href="project-info.html">Project Information</a>
+ </li>
+
+
+
+
+
+ <li class="collapsed">
+ <a href="project-reports.html">Project Reports</a>
+ </li>
+ </ul>
+
+
+
+ <a href="http://sourceforge.net/projects/checkstyle" title="SourceForge" class="poweredBy">
+ <img alt="SourceForge" src="http://sflogo.sourceforge.net/sflogo.php?group_id=29721&type=11" />
+ </a>
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+ <div id="bodyColumn">
+ <div id="contentBox">
+ <div class="section"><h2><a name="Description"></a>Description</h2>
+<p> + This task runs Checkstyle over specified Java files. The task has been + tested using ANT 1.5. The latest version of checkstyle can be found + at + <a href="http://checkstyle.sourceforge.net/" class="externalLink">http://checkstyle.sourceforge.net/</a>. + + This task is included in the checkstyle distribution. + </p>
+</div>
+<div class="section"><h2><a name="Installation"></a>Installation</h2>
+<p> + The easiest way is to include + <code>checkstyle-5.3-all.jar</code> in the + classpath. This contains all the classes required to run + Checkstyle. Alternatively, you must include the + <code>compile</code> third party dependencies listed in <a href="dependencies.html">Project Dependencies</a> in the + classpath. + </p>
+<p> + To use the task in a build file, you will need the following + <code>taskdef</code> declaration: + </p>
+<div class="source"><pre> +<taskdef resource="checkstyletask.properties" + classpath="/path/to/checkstyle-5.3-all.jar"/> + </pre>
+</div>
+<p> + Or, assuming that Checkstyle is in the global classpath (not + recommended), then you will need the following <code>taskdef</code> + declaration: + </p>
+<div class="source"><pre> +<taskdef resource="checkstyletask.properties"/> + </pre>
+</div>
+<p> + Or if you use Ant 1.6 and later and assuming that Checkstyle + is in the library search path, then you may use antlib feature + of Ant (see <a href="http://ant.apache.org/manual/Types/antlib.html" class="externalLink">http://ant.apache.org/manual/Types/antlib.html</a> + for more details). For example: + </p>
+<div class="source"><pre> +<project name="foo" ... + xmlns:cs="antlib:com.puppycrawl.tools.checkstyle"> +... + <cs:checkstyle> + ... + </cs:checkstyle> +... +</project> + </pre>
+</div>
+</div>
+<div class="section"><h2><a name="Parameters"></a>Parameters</h2>
+<table class="bodyTable"><tr class="a"><td><b>Attribute</b></td>
+<td><b>Description</b></td>
+<td><b>Required</b></td>
+</tr>
+<tr class="b"><td>file</td>
+<td>File to run checkstyle on.</td>
+<td> + One of either <i>file</i> or at least one nested <i>fileset</i> + element + </td>
+</tr>
+<tr class="a"><td>config</td>
+<td> + Specifies a file that defines the configuration modules. <a href="config.html">See here</a> for a description of how to define + a configuration. + </td>
+<td>Exactly one of config or configURL</td>
+</tr>
+<tr class="b"><td>configURL</td>
+<td> + Specifies a URL that defines the configuration modules. <a href="config.html">See here</a> for a description of how to define + a configuration. + </td>
+<td>Exactly one of config or configURL</td>
+</tr>
+<tr class="a"><td>properties</td>
+<td> + Specifies a file that contains properties for <a href="config.html#Properties"> expanded property values</a> of the + configuration. Ant properties (like ${basedir}) and nested + property elements override the properties in this file. + </td>
+<td>No</td>
+</tr>
+<tr class="b"><td>failOnViolation</td>
+<td> + Specifies whether the build will continue even if there are + violations. Defaults to <code>"true"</code>. + </td>
+<td>No</td>
+</tr>
+<tr class="a"><td>failureProperty</td>
+<td>The name of a property to set in the event of a violation.</td>
+<td>No</td>
+</tr>
+<tr class="b"><td>maxErrors</td>
+<td> + The maximum number of errors that are tolerated before + breaking the build or setting the failure property. Defaults + to <code>"0"</code>. + </td>
+<td>No</td>
+</tr>
+<tr class="a"><td>maxWarnings</td>
+<td> + The maximum number of warnings that are tolerated before + breaking the build or setting the failure property. Defaults + to <code>"2147483647"</code>, i.e. + + <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#MAX_VALUE" class="externalLink">Integer.MAX_VALUE</a>. + </td>
+<td>No</td>
+</tr>
+<tr class="b"><td>classpath</td>
+<td> + The classpath to use when looking up classes. Defaults to the + current classpath. + </td>
+<td>No</td>
+</tr>
+<tr class="a"><td>classpathref</td>
+<td> + The classpath to use when looking up classes, given as a reference + to a path defined elsewhere. + </td>
+<td>No</td>
+</tr>
+<tr class="b"><td>omitIgnoredModules</td>
+<td> + For efficiency, Checkstyle does not invoke modules with a configured severity of "ignore" + (since their output would be ignored anyway). A small number of modules may choose to log above their + configured severity level and so always need to be invoked. This settings specifies that behaviour. + Defaults to <code>"true"</code>. + </td>
+<td>No</td>
+</tr>
+</table>
+<p> + Note that the <code>packageNamesFile</code> + parameter has been dropped for Checkstyle 5.0, because of + significant changes regarding package name file handling. See <a href="config.html#Packages"></a> for details. + </p>
+</div>
+<div class="section"><h2><a name="Nested_Elements"></a>Nested Elements</h2>
+<p> + This task supports the nested elements <a href="http://ant.apache.org/manual/Types/fileset.html" class="externalLink"><fileset></a>, + <a href="http://ant.apache.org/manual/using.html#path" class="externalLink"><classpath></a>, + <code><formatter></code>, and <code><property></code>. + </p>
+<p> + The parameters for the <code><formatter></code> + element are: + </p>
+<table class="bodyTable"><tr class="a"><td><b>Attribute</b></td>
+<td><b>Description</b></td>
+<td><b>Required</b></td>
+</tr>
+<tr class="b"><td>type</td>
+<td><p>The type of output to generate. The valid values are:</p>
+<ul><li><code>plain</code> - specifies the <a href="apidocs/com/puppycrawl/tools/checkstyle/DefaultLogger.html">DefaultLogger</a></li>
+<li><code>xml</code> - specifies the <a href="apidocs/com/puppycrawl/tools/checkstyle/XMLLogger.html">XMLLogger</a></li>
+</ul>
+<p>Defaults to <code>"plain"</code>.</p>
+</td>
+<td>No</td>
+</tr>
+<tr class="a"><td>toFile</td>
+<td> + The file to write output to. Defaults to standard output. Note, + there is no way to explicitly specify standard output. + </td>
+<td>No</td>
+</tr>
+<tr class="b"><td>useFile</td>
+<td>Boolean that determines whether output should be sent to + a file. Default is <code>true</code>.</td>
+<td>No</td>
+</tr>
+</table>
+<p> + A <code><property></code> element provides a property for + <a href="config.html#Properties">expanded property values</a> of + the configuration. The parameters for the + <code><property></code> element are: + </p>
+<table class="bodyTable"><tr class="a"><td><b>Attribute</b></td>
+<td><b>Description</b></td>
+<td><b>Required</b></td>
+</tr>
+<tr class="b"><td>key</td>
+<td><p>The key for the property.</p>
+</td>
+<td>Yes</td>
+</tr>
+<tr class="a"><td>value</td>
+<td>The value of the property specified as a string.</td>
+<td>Either <i>value</i> or <i>file</i></td>
+</tr>
+<tr class="b"><td>file</td>
+<td> + The value of the property specified as a file. This is great for + specifying file names relative to the ANT build file. + </td>
+<td>Either <i>value</i> or <i>file</i></td>
+</tr>
+</table>
+</div>
+<div class="section"><h2><a name="Examples"></a>Examples</h2>
+<p><b> + Run checkstyle with configuration file + <code>docs/sun_checks.xml</code> on a single file + </b></p>
+<div class="source"><pre> +<checkstyle config="docs/sun_checks.xml" file="Check.java"/> + </pre>
+</div>
+<p><b> + Run checkstyle on a set of Java files using site-wide configuration + and an expanded property value + </b></p>
+<div class="source"><pre> +<checkstyle config="/path/to/site/sun_checks.xml"> + <fileset dir="src/checkstyle" includes="**/*.java"/> + + <!-- Location of cache-file. Something that is project specific --> + <property key="checkstyle.cache.file" file="target/cachefile"/> +</checkstyle> + </pre>
+</div>
+<p><b> + Run checkstyle on a set of files and output messages to standard + output in plain format, and a file in XML format + </b></p>
+<div class="source"><pre> +<checkstyle config="docs/sun_checks.xml"> + <fileset dir="src/checkstyle" includes="**/*.java"/> + <formatter type="plain"/> + <formatter type="xml" toFile="build/checkstyle_errors.xml"/> +</checkstyle> + </pre>
+</div>
+<p><b> + Run checkstyle with configuration file + <code>docs/sun_checks.xml</code> on a file and provide a package + names file + </b></p>
+<div class="source"><pre> +<checkstyle config="docs/sun_checks.xml" + packageNamesFile="myPackageNames.xml" + file="Check.java"/> + </pre>
+</div>
+<p><b> + Run checkstyle in an automated build and send an email report if + style violations are detected + </b></p>
+<div class="source"><pre> +<target name="checkstyle" + description="Generates a report of code convention violations."> + + <checkstyle config="docs/sun_checks.xml" + failureProperty="checkstyle.failure" + failOnViolation="false"> + <formatter type="xml" tofile="checkstyle_report.xml"/> + <fileset dir="src" includes="**/*.java"/> + </checkstyle> + + <style in="checkstyle_report.xml" out="checkstyle_report.html" style="checkstyle.xsl"/> + +</target> + +<!-- run this target as part of automated build --> +<target name="checkstyle-nightly" + depends="checkstyle" + if="checkstyle.failure" + description="Sends email if checkstyle detected code conventions violations."> + + <!-- use your own server and email addresses below. See Ant documentation for details --> + + <mail from="qa@some.domain" + tolist="someone@some.domain,someoneelse@some.domain" + mailhost="mailbox.some.domain" + subject="Checkstyle violation(s) in project ${ant.project.name}" + files="checkstyle_report.html"/> + +</target> + </pre>
+</div>
+</div>
+
+ </div>
+ </div>
+ <div class="clear">
+ <hr/>
+ </div>
+ <div id="footer">
+ <div class="xright">©
+ 2001-2010
+
+
+
+
+
+
+
+
+
+ </div>
+ <div class="clear">
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
|