Not needed anymore
This commit is contained in:
parent
7ae44527dd
commit
441025a2f7
|
|
@ -1,249 +0,0 @@
|
|||
<?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>Checks for Headers</title>
|
||||
<link rel="stylesheet" type="text/css" href="mystyle.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- The header -->
|
||||
<table border="0" width="100%" summary="header layout">
|
||||
<tr>
|
||||
<td><h1>Checks for Headers</h1></td>
|
||||
<td align="right"><img src="logo.png" alt="Checkstyle Logo"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- content -->
|
||||
<table border="0" width="100%" cellpadding="5" summary="body layout">
|
||||
<tr>
|
||||
<!--Left menu-->
|
||||
<td class="menu" valign="top">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#Header">Header</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#RegexpHeader">RegexpHeader</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<!--Content-->
|
||||
<td class="content" valign="top" align="left">
|
||||
|
||||
<a name="Header"></a> <h2>Header</h2> <h4>Description</h4>
|
||||
<p class="body">
|
||||
Checks that a source file begins with a specified header. Property <span class="code">
|
||||
headerFile</span> specifies a file that contains the required header.
|
||||
Alternatively, the header specification can be set directly in the
|
||||
<span class="code">header</span> property without the need for an external file.
|
||||
</p>
|
||||
<p class="body">
|
||||
Property <span class="code">ignoreLines</span> specifies the line numbers to
|
||||
ignore when matching lines in a header file. This property is very useful for
|
||||
supporting headers that contain copyright dates. For example, consider the
|
||||
following header:
|
||||
</p>
|
||||
<pre class="body">
|
||||
line 1: ////////////////////////////////////////////////////////////////////
|
||||
line 2: // checkstyle:
|
||||
line 3: // Checks Java source code for adherence to a set of rules.
|
||||
line 4: // Copyright (C) 2002 Oliver Burn
|
||||
line 5: ////////////////////////////////////////////////////////////////////
|
||||
</pre>
|
||||
<p class="body">
|
||||
Since the year information will change over time, you can tell Checkstyle to
|
||||
ignore line 4 by setting property <span class="code">ignoreLines</span> to <span class="code">
|
||||
4</span>.
|
||||
</p>
|
||||
<h4>Properties</h4>
|
||||
<table width="100%" border="1" cellpadding="5" class="body">
|
||||
<tr class="header">
|
||||
<th>name</th>
|
||||
<th>description</th>
|
||||
<th>type</th>
|
||||
<th>default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>headerFile</td>
|
||||
<td>name of the file containing the required header</td>
|
||||
<td><a href="property_types.html#string">string</a></td>
|
||||
<td><span class="default">null</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>header</td>
|
||||
<td>the required header specified inline. Individual header lines
|
||||
must be separated by the string <span class="code">"\n"</span>
|
||||
(even on platforms with a different line separator),
|
||||
see examples below.</td>
|
||||
<td><a href="property_types.html#string">string</a></td>
|
||||
<td><span class="default">null</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ignoreLines</td>
|
||||
<td>line numbers to ignore</td>
|
||||
<td><a href="property_types.html#intSet">list of integers</a></td>
|
||||
<td><span class="default">{}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>Example</h4>
|
||||
<p class="body">
|
||||
To configure the check to use header file <span class="code">"java.header"</span>
|
||||
and ignore lines <span class="code">2</span>, <span class="code">3</span>, and <span class="code">
|
||||
4</span>:
|
||||
</p>
|
||||
<pre class="body">
|
||||
<module name="Header">
|
||||
<property name="headerFile" value="java.header"/>
|
||||
<property name="ignoreLines" value="2, 3, 4"/>
|
||||
</module>
|
||||
</pre>
|
||||
|
||||
<p class="body">
|
||||
To configure the check to verify that each file starts with the header
|
||||
</p>
|
||||
<pre class="body">
|
||||
// Copyright (C) 2004 MyCompany
|
||||
// All rights reserved
|
||||
</pre>
|
||||
<p class="body">
|
||||
without the need for an external header file:
|
||||
</p>
|
||||
<pre class="body">
|
||||
<module name="Header">
|
||||
<property name="header" value="// Copyright (C) 2004 MyCompany\n// All rights reserved"/>
|
||||
</module>
|
||||
</pre>
|
||||
|
||||
<h4>Package</h4>
|
||||
<p class="body">
|
||||
com.puppycrawl.tools.checkstyle.checks
|
||||
</p>
|
||||
<h4>Parent Module</h4>
|
||||
<p class="body">
|
||||
<a href="config.html#treewalker">TreeWalker</a>
|
||||
</p>
|
||||
<a name="RegexpHeader"></a> <h2>RegexpHeader</h2> <h4>Description</h4>
|
||||
<p class="body">
|
||||
Checks the header of a source file against a header that contains a <a href="http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html">regular
|
||||
expression</a> for each line of the source header.
|
||||
</p>
|
||||
<p class="body">
|
||||
Rationale: In some projects <a href="#Header">checking against a fixed header</a>
|
||||
is not sufficient, e.g. the header might require a copyright line where the year
|
||||
information is not static.
|
||||
</p>
|
||||
<p class="body">
|
||||
For example, consider the following header:
|
||||
</p>
|
||||
<pre class="body">
|
||||
line 1: ^/{71}$
|
||||
line 2: ^// checkstyle:$
|
||||
line 3: ^// Checks Java source code for adherence to a set of rules\.$
|
||||
line 4: ^// Copyright \(C\) \d\d\d\d Oliver Burn$
|
||||
line 5: ^// Last modification by \$Author.*\$$
|
||||
line 6: ^/{71}$
|
||||
line 7:
|
||||
line 8: ^package
|
||||
line 9:
|
||||
line 10: ^import
|
||||
line 11:
|
||||
line 12: ^/\*\*
|
||||
line 13: ^ \*([^/]|$)
|
||||
line 14: ^ \*/
|
||||
</pre>
|
||||
|
||||
<p class="body">
|
||||
Lines 1 and 6 demonstrate a more compact notation for 71 '/'
|
||||
characters. Line 4 enforces that the copyright notice includes a
|
||||
four digit year. Line 5 is an example how to enforce revision
|
||||
control keywords in a file header. Lines 12-14 is a template for
|
||||
javadoc (line 13 is so complecated to remove conflict with
|
||||
and of javadoc comment).
|
||||
</p>
|
||||
<h4>Properties</h4>
|
||||
<table width="100%" border="1" cellpadding="5" class="body">
|
||||
<tr class="header">
|
||||
<th>name</th>
|
||||
<th>description</th>
|
||||
<th>type</th>
|
||||
<th>default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>headerFile</td>
|
||||
<td>name of the file containing the required header</td>
|
||||
<td><a href="property_types.html#string">string</a></td>
|
||||
<td><span class="default">null</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>header</td>
|
||||
<td>the required header specified inline. Individual header lines
|
||||
must be separated by the string <span class="code">"\n"</span>
|
||||
(even on platforms with a different line separator), and regular
|
||||
expressions must not span multiple lines.</td>
|
||||
<td><a href="property_types.html#string">string</a></td>
|
||||
<td><span class="default">null</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>multiLines</td>
|
||||
<td>line numbers to repeat (zero or more times)</td>
|
||||
<td><a href="property_types.html#intSet">list of integers</a></td>
|
||||
<td><span class="default">{}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>Example</h4>
|
||||
<p class="body">
|
||||
To configure the check to use header file <span
|
||||
class="code">"java.header"</span> and <span
|
||||
class="code">10</span> and <span class="code">13</span>
|
||||
muli-lines:
|
||||
</p>
|
||||
<pre class="body">
|
||||
<module name="RegexpHeader">
|
||||
<property name="headerFile" value="java.header"/>
|
||||
<property name="multiLines" value="10, 13"/>
|
||||
</module>
|
||||
</pre>
|
||||
<p class="body">
|
||||
To configure the check to verify that each file starts with the header
|
||||
</p>
|
||||
<pre class="body">
|
||||
^// Copyright \(C\) (\d\d\d\d -)? 2004 MyCompany$
|
||||
^// All rights reserved$
|
||||
</pre>
|
||||
<p class="body">
|
||||
without the need for an external header file:
|
||||
</p>
|
||||
<pre class="body">
|
||||
<module name="RegexpHeader">
|
||||
<property name="header" value="^// Copyright \(C\) (\d\d\d\d -)? 2004 MyCompany$\n^// All rights reserved$"/>
|
||||
</module>
|
||||
</pre>
|
||||
<p class="body">
|
||||
<u>Note</u>: <span class="code">ignoreLines</span> property has been
|
||||
removed from this check to simplify it. To make some line
|
||||
optional use "^.*$" regexp for this line.
|
||||
</p>
|
||||
<h4>Package</h4>
|
||||
<p class="body">
|
||||
com.puppycrawl.tools.checkstyle.checks
|
||||
</p>
|
||||
<h4>Parent Module</h4>
|
||||
<p class="body">
|
||||
<a href="config.html#treewalker">TreeWalker</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<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>
|
||||
252
docs/index.html
252
docs/index.html
|
|
@ -1,252 +0,0 @@
|
|||
<?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>
|
||||
<meta name="keywords" content="inspection, lint"/>
|
||||
<title>Checkstyle Home Page</title>
|
||||
<link rel="stylesheet" type="text/css" href="mystyle.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- The header -->
|
||||
<table border="0" width="100%" summary="header layout">
|
||||
<tr>
|
||||
<td>
|
||||
<h1>Checkstyle Home Page</h1>
|
||||
</td>
|
||||
<td align="right">
|
||||
<img src="logo.png" alt="Checkstyle Logo"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- content -->
|
||||
<table border="0" width="100%" cellpadding="5" summary="body layout">
|
||||
<tr>
|
||||
<!--Left menu-->
|
||||
<td valign="top" class="menu">
|
||||
<p>Checkstyle</p>
|
||||
<ul>
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#features">Features</a></li>
|
||||
<li><a href="#download">Download</a></li>
|
||||
<li><a href="#upgrading">Upgrading</a></li>
|
||||
<li><a href="java.header">License</a></li>
|
||||
<li><a href="#related">Related Tools</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Documentation</p>
|
||||
<ul>
|
||||
<li><a href="releasenotes.html">Release Notes</a></li>
|
||||
<li><a href="config.html">Configuration</a></li>
|
||||
<li><a href="anttask.html">ANT Task</a></li>
|
||||
<li><a href="cmdline.html">Command Line</a></li>
|
||||
<li><a href="writingchecks.html">Writing Checks</a></li>
|
||||
<li><a href="writinglisteners.html">Writing Listeners</a></li>
|
||||
<li><a href="writingfilters.html">Writing Filters</a></li>
|
||||
</ul>
|
||||
|
||||
<p>SourceForge</p>
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/mail/?group_id=29721">Mailing Lists</a></li>
|
||||
<li><a href="http://sourceforge.net/tracker/?atid=397078&group_id=29721&func=browse">Bug Database</a></li>
|
||||
<li><a href="http://sourceforge.net/tracker/?atid=397081&group_id=29721&func=browse">Feature Requests</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Developers</p>
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/checkstyle">Project Page</a></li>
|
||||
<li><a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/checkstyle/">CVS Repository</a></li>
|
||||
|
||||
|
||||
<li><a href="api/index.html">JavaDoc</a></li>
|
||||
<li><a href="contributing.html">Contributing</a></li>
|
||||
<li><a href="http://checkstyle.sourceforge.net/clover_html">Code Coverage</a></li>
|
||||
</ul>
|
||||
|
||||
<div align="center">
|
||||
<p><a href="http://www.cenqua.com/clover?ref=checkstyle">
|
||||
<img src="http://www.cenqua.com/clover/images/clovered1.gif?ref=checkstyle" alt="Clover Logo"/></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>Hosted by:</p>
|
||||
<div align="center">
|
||||
<p><a href="http://sourceforge.net">
|
||||
<img src="http://sourceforge.net/sflogo.php?group_id=29721&type=1" width="88" height="31" alt="SourceForge Logo"/></a>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!--Content-->
|
||||
<td valign="top" align="left">
|
||||
|
||||
<a name="overview"></a>
|
||||
<h2>Overview</h2>
|
||||
<p class="body">
|
||||
Checkstyle is a development tool to help programmers write Java code
|
||||
that adheres to a coding standard. It automates the process
|
||||
of checking Java code to spare humans of this boring (but important)
|
||||
task. This makes it ideal for projects that want to enforce a coding
|
||||
standard.
|
||||
</p>
|
||||
|
||||
<p class="body"> Checkstyle is highly configurable and can be made to
|
||||
support almost any coding standard. An example configuration file is
|
||||
supplied supporting the <a href="http://java.sun.com/docs/codeconv/">Sun
|
||||
Code Conventions</a>. As well, other sample configuration files are
|
||||
supplied for other well known conventions.</p>
|
||||
|
||||
<p class="body">
|
||||
A good example of a report that can be produced using Checkstyle and
|
||||
<a href="http://maven.apache.org/">Maven</a> can be
|
||||
<a href="http://maven.apache.org/checkstyle-report.html">seen here</a>.
|
||||
</p>
|
||||
|
||||
<p class="body"> After many months of development Checkstyle version 3
|
||||
has been released. There have been many <a
|
||||
href="releasenotes.html">improvements</a> that we strongly encourage you
|
||||
to upgrade. However if you are stuck on the last 2.4 release, the old
|
||||
documentation is <a
|
||||
href="http://checkstyle.sourceforge.net/old-2.4/">available here</a>. Be
|
||||
sure to read the section about <a href="#upgrading">upgrading to
|
||||
3.x</a>. </p>
|
||||
|
||||
<a name="features"></a>
|
||||
<h2>Features</h2>
|
||||
<p class="body">The things that Checkstyle can check for are:</p>
|
||||
|
||||
<ul>
|
||||
<li class="body"><a href="config_javadoc.html">Javadoc Comments</a></li>
|
||||
<li class="body"><a href="config_naming.html">Naming Conventions</a></li>
|
||||
<li class="body"><a href="config_header.html">Headers</a></li>
|
||||
<li class="body"><a href="config_import.html">Imports</a></li>
|
||||
<li class="body"><a href="config_sizes.html">Size Violations</a></li>
|
||||
<li class="body"><a href="config_whitespace.html">Whitespace</a></li>
|
||||
<li class="body"><a href="config_modifiers.html">Modifiers</a></li>
|
||||
<li class="body"><a href="config_blocks.html">Blocks</a></li>
|
||||
<li class="body"><a href="config_coding.html">Coding Problems</a></li>
|
||||
<li class="body"><a href="config_design.html">Class Design</a></li>
|
||||
<li class="body"><a href="config_duplicates.html">Duplicate Code</a></li>
|
||||
<li class="body"><a href="config_metrics.html">Metrics Checks</a></li>
|
||||
<li class="body"><a href="config_misc.html">Miscellaneous Checks</a></li>
|
||||
<li class="body"><a href="optional.html">Optional Checks</a></li>
|
||||
</ul>
|
||||
|
||||
<a name="download"></a>
|
||||
<h2>Download</h2>
|
||||
|
||||
<p class="body">
|
||||
The latest release of Checkstyle can be downloaded from <a href="http://sourceforge.net/project/showfiles.php?group_id=29721">the SourceForge download page</a>.
|
||||
</p>
|
||||
|
||||
<p class="body">
|
||||
If you want to live on the bleeding edge, you can <a href="http://sourceforge.net/cvs/?group_id=29721">checkout the current development code from CVS</a> and compile yourself.
|
||||
</p>
|
||||
|
||||
<a name="upgrading"></a>
|
||||
<h2>Upgrading to release 3.x</h2>
|
||||
|
||||
<p class="body">
|
||||
As of release 3.0 Checkstyle has changed it's configuration
|
||||
system. The configuration file is now an XML file that configures a
|
||||
tree of check modules. The Checkstyle 2 configuration files (based on
|
||||
properties) are not supported in Checkstyle 3. Please consult the <a
|
||||
href="config.html">documentation</a> to learn about the new
|
||||
configuration file format.
|
||||
</p>
|
||||
|
||||
<a name="related"></a>
|
||||
<h2>Related Tools</h2>
|
||||
|
||||
<p class="body">
|
||||
Checkstyle is most useful if you integrate it in your build process or
|
||||
your development environment. The distribution includes:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li class="body">An <a href="http://ant.apache.org/index.html">Ant</a> task.</li>
|
||||
<li class="body">A command line tool.</li>
|
||||
</ul>
|
||||
|
||||
<p class="body">
|
||||
Additionally plug-ins are written by third-parties. Currently they are
|
||||
typically based on the Checkstyle 2.4 release. The known plug-ins are:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li class="body">
|
||||
David Schneider has written a plug-in to integrate Checkstyle with <a
|
||||
href="http://www.eclipse.org">Eclipse/WSAD</a>. It is available from <a
|
||||
href="http://eclipse-cs.sourceforge.net/">http://eclipse-cs.sourceforge.net/</a>.
|
||||
</li>
|
||||
|
||||
<li class="body">
|
||||
Marco van Meegen has written a plug-in to integrate Checkstyle with <a
|
||||
href="http://www.eclipse.org">Eclipse/WSAD</a>. It is available from <a
|
||||
href="http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm">http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm</a>.
|
||||
</li>
|
||||
|
||||
<li class="body">
|
||||
Mark Lussier has written a plug-in to integrate Checkstyle with <a
|
||||
href="http://www.intellij.com/idea/">IntelliJ IDEA</a>. It is available from
|
||||
<a
|
||||
href="http://www.intellij.org/twiki/bin/view/Main/JetStylePlugin">http://www.intellij.org/twiki/bin/view/Main/JetStylePlugin</a>.
|
||||
</li>
|
||||
|
||||
<li class="body">
|
||||
Darrel King has written a plug-in to integrate Checkstyle with
|
||||
<a href="http://www.borland.com/jbuilder/">Borland JBuilder</a>.
|
||||
It is available from <a
|
||||
href="http://www.pautinka.com/">http://www.pautinka.com/</a>.
|
||||
</li>
|
||||
|
||||
<li class="body">
|
||||
Henri Tremblay has written JBCS, another plug-in to integrate
|
||||
Checkstyle with
|
||||
<a href="http://www.borland.com/jbuilder/">Borland JBuilder</a>.
|
||||
It is available from <a
|
||||
href="http://jbcheckstyle-pg.sourceforge.net/">http://jbcheckstyle-pg.sourceforge.net/</a>.
|
||||
</li>
|
||||
|
||||
<li class="body">
|
||||
The <a href="http://maven.apache.org/">Maven</a> project management
|
||||
system provides support for Checkstyle. <a
|
||||
href="http://maven.apache.org/reference/plugins/checkstyle/index.html">Configuration
|
||||
documentation</a> and an <a
|
||||
href="http://maven.apache.org/checkstyle-report.html">example report</a> are
|
||||
also available.
|
||||
</li>
|
||||
|
||||
<li class="body">Xandy Johnson has written a file-type plug-in to integrate Checkstyle with the <a href="http://www.vim.org">Vim editor</a>. It is available from <a href="http://vim.sourceforge.net/script.php?script_id=448">here</a>.</li>
|
||||
<li class="body">Todd Papaioannou has written <a href="http://plugins.jedit.org/plugins/?CheckStylePlugin">CheckStylePlugin</a> to integrate Checkstyle with the very cool <a href="http://www.jedit.org/">jEdit</a> editor.</li>
|
||||
<li class="body">Paul Goulbourn has written <a href="http://nbcheckstyle.sourceforge.net">nbCheckStyle</a>, a module to integrate Checkstyle with <a href="http://www.netbeans.org">NetBeans</a>.</li>
|
||||
<li class="body">The <a href="http://www.krysalis.org/centipede/">Krysalis Centipede</a> build system provides a plug-in for Checkstyle. Documentation is available from <a href="http://www.krysalis.org/centipede/centipede/">http://www.krysalis.org/centipede/centipede/</a>.</li>
|
||||
<li class="body">Angus Chan has written <a href="http://jbcheckstyle.sourceforge.net">jbCheckStyle</a>, an Open Tool for JBuilder.</li>
|
||||
<li class="body">Markus Mohnen has written a nice interface to Checkstyle for the <a href="http://jdee.sunsite.dk">Emacs JDE</a>. It is now part of the standard JDEE distribution.</li>
|
||||
<li class="body">Rick Giles has written a <a href="http://www.bluej.org">BlueJ</a> extension for Checkstyle. It is available <a href="http://bluejcheckstyle.sourceforge.net/">here</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p class="body">
|
||||
Martin Smith has <a
|
||||
href="http://www.beansmith.com/coding/CheckStyle_SlickEdit.html">written
|
||||
instructions</a> on how to set-up Checkstyle with the <a
|
||||
href="http://www.slickedit.com">SlickEdit</a> editor.
|
||||
</p>
|
||||
|
||||
<p class="body">
|
||||
|
||||
If you have written a plugin for other IDEs, please let us know, so we
|
||||
can provide a link here.
|
||||
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr/>
|
||||
<p class="copyright">Copyright © 2001-2004 Oliver Burn. All rights Reserved.</p>
|
||||
|
||||
</body> </html>
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue