78 lines
2.5 KiB
HTML
78 lines
2.5 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>Optional Checks - Version @CHECKSTYLE_VERSION@</title>
|
|
<link rel="stylesheet" type="text/css" href="mystyle.css"/>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<table border="0" width="100%" summary="header layout">
|
|
<tr>
|
|
<td>
|
|
<h1>Optional Checks - Version @CHECKSTYLE_VERSION@</h1>
|
|
</td>
|
|
<td align="right">
|
|
<img src="logo.png" alt="Checkstyle Logo"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Overview</h2>
|
|
|
|
<p>
|
|
Core Checkstyle Checks are applicable to general Java coding style and require no
|
|
external libraries. An optional Check is for special applications or requires
|
|
additional libraries. There are are optional Checks for:
|
|
</p>
|
|
<ul>
|
|
<li><a href="config_j2ee.html">J2EE Requirements</a></li>
|
|
<li><a href="config_usage.html">Usage</a></li>
|
|
</ul>
|
|
|
|
|
|
<h2>Configuration</h2>
|
|
<p>
|
|
As with core Checks, optional Checks are configured as submodules of
|
|
<a href="http://config.html#treewalker">TreeWalker</a>. The shortened
|
|
name of an optional Check module must include the appropriate package
|
|
name prefix. For example, this is a configuration fragment
|
|
for Check <span class="code">com.puppycrawl.tools.checkstyle.checks.usage.UnusedLocalVariable</span>:
|
|
</p>
|
|
<pre>
|
|
<module name="usage.UnusedLocalVariable"/>
|
|
</pre>
|
|
|
|
<p>
|
|
Consult the <a href="config.html#packagenames">Checkstyle configuration manual</a>
|
|
to learn how to integrate
|
|
optional Checks into the package configuration so that you can use fully shortened
|
|
names such as <span class="code">UnusedLocalVariable</span>.
|
|
</p>
|
|
<h2>Usage</h2>
|
|
<p>
|
|
Optional checks are distributed in jar file
|
|
<span class="code">checkstyle-optional-@CHECKSTYLE_VERSION@.jar</span> and,
|
|
in order to use an optional check, this jar file must be in the classpath.
|
|
For example, this is a command to run Checkstyle with a configuration
|
|
that contains optional checks:
|
|
</p>
|
|
<pre>
|
|
java -classpath checkstyle-optional-@CHECKSTYLE_VERSION@.jar:checkstyle-all-@CHECKSTYLE_VERSION@.jar \
|
|
com.puppycrawl.tools.checkstyle.Main \
|
|
-c config.xml -r .
|
|
</pre>
|
|
<p>
|
|
Please consult <a href="cmdline.html">Command Line</a> and
|
|
<a href="anttask.html">ANT Task</a> documentation for further usage information.
|
|
</p>
|
|
|
|
<hr />
|
|
<div><a href="index.html">Back to the Checkstyle Home Page</a></div>
|
|
<p class="copyright">Copyright © 2002-2004 Oliver Burn. All rights Reserved.</p>
|
|
</body>
|
|
</html>
|