Issue #2425: fixed invalid xml examples in xdocs

This commit is contained in:
rnveach 2015-10-22 23:05:08 -04:00
parent 57408d4463
commit 24f73e69dc
17 changed files with 301 additions and 152 deletions

View File

@ -129,7 +129,7 @@ class PackageObjectFactory implements ModuleFactory {
declaredConstructor.setAccessible(true);
return declaredConstructor.newInstance();
}
catch (final ReflectiveOperationException exception) {
catch (final ReflectiveOperationException | NoClassDefFoundError exception) {
throw new CheckstyleException("Unable to find class for " + className, exception);
}
}

View File

@ -155,10 +155,10 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtils;
* </p>
* <pre>
* &lt;module name="VariableDeclarationUsageDistance"&gt;
* &lt;property name="allowedDistance" value="4"&gt;
* &lt;property name="ignoreVariablePattern" value="^temp.*"&gt;
* &lt;property name="validateBetweenScopes" value="true"&gt;
* &lt;property name="ignoreFinal" value="false"&gt;
* &lt;property name="allowedDistance" value="4"/&gt;
* &lt;property name="ignoreVariablePattern" value="^temp.*"/&gt;
* &lt;property name="validateBetweenScopes" value="true"/&gt;
* &lt;property name="ignoreFinal" value="false"/&gt;
* &lt;/module&gt;
* </pre>
*

View File

@ -42,7 +42,7 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtils;
*
* <pre>
* {@code
* &lt;module name=&quot;CommentsIndentation&quot;/module&gt;
* &lt;module name=&quot;CommentsIndentation&quot;/&gt;
* }
* {@code
* /*

View File

@ -31,16 +31,6 @@ import com.puppycrawl.tools.checkstyle.utils.JavadocUtils;
* <pre>
* &lt;module name=&quot;NonEmptyAtclauseDescription&quot;/&gt;
* </pre>
* <p>
* To check non-empty at-clause description for tags {@code @throws},
* {@code @deprecated}, use following configuration:
* </p>
* <pre>
* &lt;module name=&quot;NonEmptyAtclauseDescription&quot;&gt;
* &lt;property name=&quot;target&quot; value=&quot;JAVADOC_TAG_THROWS_LITERAL,
* JAVADOC_TAG_DEPRECATED_LITERAL&quot;/&gt;
* &lt;/module&gt;
* </pre>
*
* @author maxvetrenko
*

View File

@ -53,7 +53,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
* </p>
* <pre class="body">
* &lt;module name=&quot;NoLineWrap&quot;&gt;
* &lt;property name="tokens" value="IMPORT"&gt;
* &lt;property name="tokens" value="IMPORT"/&gt;
* &lt;/module&gt;
* </pre>
*

View File

@ -1,83 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2015 the original author or authors.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import org.junit.Assert;
import org.junit.Test;
import com.google.common.io.Files;
public class AllChecksPresentOnAvailableChecksPageTest {
private static final File JAVA_SOURCES_DIRECTORY = new File("src/main/java");
private static final String AVAILABLE_CHECKS_PATH = "src/xdocs/checks.xml";
private static final File AVAILABLE_CHECKS_FILE = new File(AVAILABLE_CHECKS_PATH);
private static final String CHECK_FILE_NAME = ".+Check.java$";
private static final String CHECK_SUFFIX = "Check.java";
private static final String LINK_TEMPLATE =
"(?s).*<a href=\"config_\\w+\\.html#%1$s\">%1$s</a>.*";
private static final List<String> IGNORE_LIST = Arrays.asList(
"AbstractAccessControlNameCheck.java",
"AbstractClassCouplingCheck.java",
"AbstractComplexityCheck.java",
"AbstractFileSetCheck.java",
"AbstractFormatCheck.java",
"AbstractHeaderCheck.java",
"AbstractIllegalCheck.java",
"AbstractIllegalMethodCheck.java",
"AbstractJavadocCheck.java",
"AbstractNameCheck.java",
"AbstractNestedDepthCheck.java",
"AbstractOptionCheck.java",
"AbstractParenPadCheck.java",
"AbstractSuperCheck.java",
"AbstractTypeAwareCheck.java",
"AbstractTypeParameterNameCheck.java",
"FileSetCheck.java"
);
@Test
public void testAllChecksPresentOnAvailableChecksPage() throws IOException {
final String availableChecks = Files.toString(AVAILABLE_CHECKS_FILE, UTF_8);
for (File file : Files.fileTreeTraverser().preOrderTraversal(JAVA_SOURCES_DIRECTORY)) {
final String fileName = file.getName();
if (fileName.matches(CHECK_FILE_NAME) && !IGNORE_LIST.contains(fileName)) {
final String checkName = fileName.replace(CHECK_SUFFIX, "");
if (!isPresent(availableChecks, checkName)) {
Assert.fail(checkName + " is not correctly listed on Available Checks page"
+ " - add it to " + AVAILABLE_CHECKS_PATH);
}
}
}
}
private static boolean isPresent(String availableChecks, String checkName) {
final String linkPattern = String.format(Locale.ROOT, LINK_TEMPLATE, checkName);
return availableChecks.matches(linkPattern);
}
}

View File

@ -0,0 +1,248 @@
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2015 the original author or authors.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.junit.Assert;
import org.junit.Test;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import com.google.common.io.Files;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
public class XDocsPagesTest {
private static final File JAVA_SOURCES_DIRECTORY = new File("src/main/java");
private static final File XDOCS_DIRECTORY = new File("src/xdocs");
private static final String AVAILABLE_CHECKS_PATH = "src/xdocs/checks.xml";
private static final File AVAILABLE_CHECKS_FILE = new File(AVAILABLE_CHECKS_PATH);
private static final String CHECK_FILE_NAME = ".+Check.java$";
private static final String CHECK_SUFFIX = "Check.java";
private static final String LINK_TEMPLATE =
"(?s).*<a href=\"config_\\w+\\.html#%1$s\">%1$s</a>.*";
private static final List<String> CHECKS_ON_PAGE_IGNORE_LIST = Arrays.asList(
"AbstractAccessControlNameCheck.java",
"AbstractClassCouplingCheck.java",
"AbstractComplexityCheck.java",
"AbstractFileSetCheck.java",
"AbstractFormatCheck.java",
"AbstractHeaderCheck.java",
"AbstractIllegalCheck.java",
"AbstractIllegalMethodCheck.java",
"AbstractJavadocCheck.java",
"AbstractNameCheck.java",
"AbstractNestedDepthCheck.java",
"AbstractOptionCheck.java",
"AbstractParenPadCheck.java",
"AbstractSuperCheck.java",
"AbstractTypeAwareCheck.java",
"AbstractTypeParameterNameCheck.java",
"FileSetCheck.java"
);
private static final List<String> XML_FILESET_LIST = Arrays.asList(
"TreeWalker",
"name=\"Checker\"",
"name=\"Header\"",
"name=\"Translation\"",
"name=\"SeverityMatchFilter\"",
"name=\"SuppressionFilter\"",
"name=\"SuppressionCommentFilter\"",
"name=\"SuppressWithNearbyCommentFilter\"",
"name=\"SuppressWarningsFilter\"",
"name=\"RegexpHeader\"",
"name=\"RegexpMultiline\"",
"name=\"JavadocPackage\"",
"name=\"NewlineAtEndOfFile\"",
"name=\"UniqueProperties\"",
"name=\"FileLength\"",
"name=\"FileTabCharacter\""
);
@Test
public void testAllChecksPresentOnAvailableChecksPage() throws IOException {
final String availableChecks = Files.toString(AVAILABLE_CHECKS_FILE, UTF_8);
for (File file : Files.fileTreeTraverser().preOrderTraversal(JAVA_SOURCES_DIRECTORY)) {
final String fileName = file.getName();
if (fileName.matches(CHECK_FILE_NAME) && !CHECKS_ON_PAGE_IGNORE_LIST.contains(fileName)) {
final String checkName = fileName.replace(CHECK_SUFFIX, "");
if (!isPresent(availableChecks, checkName)) {
Assert.fail(checkName + " is not correctly listed on Available Checks page"
+ " - add it to " + AVAILABLE_CHECKS_PATH);
}
}
}
}
private static boolean isPresent(String availableChecks, String checkName) {
final String linkPattern = String.format(Locale.ROOT, LINK_TEMPLATE, checkName);
return availableChecks.matches(linkPattern);
}
@Test
public void testAllXmlExamples() throws Exception {
for (File file : Files.fileTreeTraverser().preOrderTraversal(XDOCS_DIRECTORY)) {
if (file.isDirectory()) {
continue;
}
final String source = Files.toString(file, UTF_8);
int position = -1;
while (true) {
position = source.indexOf("<source>", position + 1);
if (position == -1) {
break;
}
final int nextPosition = source.indexOf("</source>", position);
final String unserializedSource = source.substring(position + 8, nextPosition)
.trim().replace("&lt;", "<").replace("&gt;", ">").replace("&quot;", "\"")
.replace("&amp;", "&").replace("...", "");
position = nextPosition;
if (unserializedSource.charAt(0) != '<'
|| unserializedSource.charAt(unserializedSource.length() - 1) != '>') {
continue;
}
// no dtd testing yet
if (unserializedSource.contains("<!")) {
continue;
}
buildAndTestXml(file.getName(), unserializedSource);
}
}
}
private static void buildAndTestXml(String fileName, String unserializedSource)
throws IOException, ParserConfigurationException {
// not all examples come with the full xml structure
String code = unserializedSource;
if (!hasFileSetClass(code)) {
code = "<module name=\"TreeWalker\">\n" + code + "\n</module>";
}
if (!code.contains("name=\"Checker\"")) {
code = "<module name=\"Checker\">\n" + code + "\n</module>";
}
if (!code.startsWith("<?xml")) {
final String dtdPath = new File(
"src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd")
.getCanonicalPath();
code = "<?xml version=\"1.0\"?>\n<!DOCTYPE module PUBLIC "
+ "\"-//Puppy Crawl//DTD Check Configuration 1.3//EN\" \"" + dtdPath + "\">\n"
+ code;
}
testRawXml(fileName, code, unserializedSource);
// can't test ant structure, or old and outdated checks
if (!fileName.startsWith("anttask") && !fileName.startsWith("releasenotes")) {
testCheckstyleXml(fileName, code, unserializedSource);
}
}
private static boolean hasFileSetClass(String xml) {
boolean found = false;
for (String find : XML_FILESET_LIST) {
if (xml.contains(find)) {
found = true;
break;
}
}
return found;
}
private static void testRawXml(String fileName, String code, String unserializedSource)
throws ParserConfigurationException {
try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(true);
final DocumentBuilder builder = factory.newDocumentBuilder();
builder.parse(new InputSource(new StringReader(code)));
}
catch (IOException | SAXException e) {
Assert.fail(fileName + " has invalid xml (" + e.getMessage() + "): "
+ unserializedSource);
}
}
private static void testCheckstyleXml(String fileName, String code, String unserializedSource)
throws IOException {
// can't process non-existent examples, or out of context snippets
if (code.contains("com.mycompany") || code.contains("checkstyle-packages")
|| code.contains("MethodLimit") || code.contains("<suppress ")
|| code.contains("<import-control ") || unserializedSource.startsWith("<property ")
|| unserializedSource.startsWith("<taskdef ")) {
return;
}
// validate checkstyle structure and contents
try {
final Properties properties = new Properties();
properties.setProperty("checkstyle.header.file",
new File("config/java.header").getCanonicalPath());
final PropertiesExpander expander = new PropertiesExpander(properties);
final Configuration config = ConfigurationLoader.loadConfiguration(new InputSource(
new StringReader(code)), expander, false);
final Checker checker = new Checker();
try {
final ClassLoader moduleClassLoader = Checker.class.getClassLoader();
checker.setModuleClassLoader(moduleClassLoader);
checker.configure(config);
}
finally {
checker.destroy();
}
}
catch (CheckstyleException e) {
Assert.fail(fileName + " has invalid Checkstyle xml (" + e.getMessage() + "): "
+ unserializedSource);
}
}
}

View File

@ -123,7 +123,7 @@
for element:
<source>
&lt;module name=&quot;com.puppycrawl.tools.checkstyle.TreeWalker&quot;&gt;
&lt;module name=&quot;com.puppycrawl.tools.checkstyle.TreeWalker&quot;/&gt;
</source>
This is useful for plugging third-party modules into a configuration.
@ -218,7 +218,9 @@
</p>
<source>
&lt;property name=&quot;headerFile&quot; value=&quot;${checkstyle.header.file}&quot;/&gt;
&lt;module name=&quot;Header&quot;&gt;
&lt;property name=&quot;headerFile&quot; value=&quot;${checkstyle.header.file}&quot;/&gt;
&lt;/module&gt;
</source>
<p>
@ -236,7 +238,7 @@
</p>
<source>
&lt;module name=&quot;JavaDocMethod&quot;&gt;
&lt;module name=&quot;JavadocMethod&quot;&gt;
&lt;property name=&quot;severity&quot;
value=&quot;${checkstyle.javadoc.severity}&quot;
default=&quot;error&quot;/&gt;
@ -375,9 +377,9 @@
&lt;property name=&quot;fileExtensions&quot; value=&quot;null&quot;/&gt;
...
&lt;/module&gt;
OR
</source>
<p>OR</p>
<source>
&lt;module name=&quot;Checker&quot;&gt;
&lt;property name=&quot;fileExtensions&quot; value=&quot;&quot;/&gt;
...
@ -479,9 +481,9 @@ OR
&lt;property name=&quot;fileExtensions&quot; value=&quot;null&quot;/&gt;
...
&lt;/module&gt;
OR
</source>
<p>OR</p>
<source>
&lt;module name=&quot;TreeWalker&quot;&gt;
&lt;property name=&quot;fileExtensions&quot; value=&quot;&quot;/&gt;
...
@ -550,7 +552,7 @@ OR
&lt;module name=&quot;MethodLength&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;METHOD_DEF&quot;/&gt;
&lt;/module&gt;
&lt;module name=&quot;MethodLength&quot;&gt;
&lt;module name=&quot;MethodLength&quot;&gt;
&lt;property name=&quot;tokens&quot; value=&quot;CTOR_DEF&quot;/&gt;
&lt;property name=&quot;max&quot; value=&quot;60&quot;/&gt;
&lt;/module&gt;

View File

@ -430,7 +430,7 @@ String nullString = null;
</p>
<source>
&lt;module name="FinalLocalVariable"&gt;
&lt;property name="token" value="VARIABLE_DEF"/&gt;
&lt;property name="tokens" value="VARIABLE_DEF"/&gt;
&lt;property name="validateEnhancedForLoopVariable" value="true"/&gt;
&lt;/module&gt;
</source>
@ -2774,7 +2774,7 @@ case 5:
<source>
&lt;module name=&quot;FallThrough&quot;&gt;
&lt;property name=&quot;reliefPattern&quot; value=&quot;continue in next case&quot;/&gt;
&lt;module name=&quot;FallThrough&quot;/&gt;
&lt;/module&gt;
</source>
</subsection>
@ -3344,10 +3344,10 @@ cal.set(Calendar.MINUTE, minutes);
</p>
<source>
&lt;module name="VariableDeclarationUsageDistance"&gt;
&lt;property name="allowedDistance" value="4"&gt;
&lt;property name="ignoreVariablePattern" value="^temp.*"&gt;
&lt;property name="validateBetweenScopes" value="true"&gt;
&lt;property name="mIgnoreFinal" value="false"&gt;
&lt;property name="allowedDistance" value="4"/&gt;
&lt;property name="ignoreVariablePattern" value="^temp.*"/&gt;
&lt;property name="validateBetweenScopes" value="true"/&gt;
&lt;property name="ignoreFinal" value="false"/&gt;
&lt;/module&gt;
</source>
</subsection>

View File

@ -123,11 +123,11 @@
For example, the following configuration fragment directs the
Checker to use a <code>SuppressionFilter</code>
with suppressions
file <code>docs/suppressions.xml</code>:
file <code>config/suppressions.xml</code>:
</p>
<source>
&lt;module name=&quot;SuppressionFilter&quot;&gt;
&lt;property name=&quot;file&quot; value=&quot;docs/suppressions.xml&quot;/&gt;
&lt;property name=&quot;file&quot; value=&quot;config/suppressions.xml&quot;/&gt;
&lt;/module&gt;
</source>
<p>

View File

@ -108,12 +108,12 @@ line 5: ////////////////////////////////////////////////////////////////////
</source>
<p>
To configure the check to use header file <code>&quot;java.header&quot;</code> and ignore lines <code>2</code>, <code>3</code>, and <code> 4</code> and only process Java files:
To configure the check to use header file <code>&quot;config/java.header&quot;</code> and ignore lines <code>2</code>, <code>3</code>, and <code> 4</code> and only process Java files:
</p>
<source>
&lt;module name=&quot;Header&quot;&gt;
&lt;property name=&quot;headerFile&quot; value=&quot;java.header&quot;/&gt;
&lt;property name=&quot;headerFile&quot; value=&quot;config/java.header&quot;/&gt;
&lt;property name=&quot;ignoreLines&quot; value=&quot;2, 3, 4&quot;/&gt;
&lt;property name=&quot;fileExtensions&quot; value=&quot;java&quot;/&gt;
&lt;/module&gt;
@ -289,11 +289,11 @@ line 6: ^\W*$
</source>
<p>
To configure the check to use header file <code>&quot;java.header&quot;</code> and <code>10</code> and <code>13</code> muli-lines:
To configure the check to use header file <code>&quot;config/java.header&quot;</code> and <code>10</code> and <code>13</code> muli-lines:
</p>
<source>
&lt;module name=&quot;RegexpHeader&quot;&gt;
&lt;property name=&quot;headerFile&quot; value=&quot;java.header&quot;/&gt;
&lt;property name=&quot;headerFile&quot; value=&quot;config/java.header&quot;/&gt;
&lt;property name=&quot;multiLines&quot; value=&quot;10, 13&quot;/&gt;
&lt;/module&gt;
</source>

View File

@ -710,12 +710,12 @@ public class SomeClass { ... }
<subsection name="Example">
<p>
To configure the check using a import control file called
&quot;import-control.xml&quot;, then have the following:
&quot;config/import-control.xml&quot;, then have the following:
</p>
<source>
&lt;module name=&quot;ImportControl&quot;&gt;
&lt;property name=&quot;file&quot; value=&quot;import-control.xml&quot;/&gt;
&lt;property name=&quot;file&quot; value=&quot;config/import-control.xml&quot;/&gt;
&lt;/module&gt;
</source>

View File

@ -221,7 +221,7 @@
<source>
&lt;module name="JavadocType"&gt;
&lt;property name="scope" value="private"/&gt;
&lt;property name="excludescope" value="package"/&gt;
&lt;property name="excludeScope" value="package"/&gt;
&lt;/module&gt;
</source>
</subsection>
@ -970,14 +970,6 @@ public boolean isSomething()
<source>
&lt;module name=&quot;NonEmptyAtclauseDescription&quot;/&gt;
</source>
<p>
To check non-empty at-clause description for tags <code>@throws</code>, <code>@deprecated</code>, use following config:
</p>
<source>
&lt;module name=&quot;NonEmptyAtclauseDescription&quot;&gt;
&lt;property name=&quot;target&quot; value=&quot;JAVADOC_TAG_THROWS_LITERAL, JAVADOC_TAG_DEPRECATED_LITERAL&quot;/&gt;
&lt;/module&gt;
</source>
</subsection>
<subsection name="Example of Usage">
@ -1036,7 +1028,7 @@ public boolean isSomething()
</p>
<source>
&lt;module name=&quot;JavadocTagContinuationIndentation&quot;&gt;
&lt;property name=&quot;tagContinuationIndentation&quot; value=&quot;4&quot;/&gt;
&lt;property name=&quot;offset&quot; value=&quot;4&quot;/&gt;
&lt;/module&gt;
</source>
</subsection>

View File

@ -236,7 +236,7 @@
To configure the Check:
</p>
<source>
&lt;module name=&quot;CommentsIndentation&quot;/module&gt;
&lt;module name=&quot;CommentsIndentation&quot;/&gt;
</source>
<source>
/*

View File

@ -130,7 +130,7 @@
&lt;property name="tokens" value="VARIABLE_DEF,CLASS_DEF"/&gt;
&lt;property name="ignoreStatic" value="false"/&gt;
&lt;property name="allowedAbbreviationLength" value="1"/&gt;
&lt;property name="allowedAbbreviation" value="XML,URL"/&gt;
&lt;property name="allowedAbbreviations" value="XML,URL"/&gt;
&lt;/module&gt;
</source>
</subsection>

View File

@ -385,26 +385,26 @@
value=&quot;\A/\*\n \* (\w*)\.java\n \*\n \* Copyright \(c\)
\d\d\d\d ACME\n \* 123 Some St\.\n \* Somewhere\.\n \*\n
\* This software is the confidential and proprietary information
of ACME\.\n \* \(&quot;Confidential Information&quot;\)\. You
of ACME\.\n \* \(&amp;quot;Confidential Information&amp;quot;\)\. You
shall not disclose such\n \* Confidential Information and shall
use it only in accordance with\n \* the terms of the license
agreement you entered into with ACME\.\n \*\n
\* \$Log: config_misc.xml,v $
\* \Revision 1.7 2007/01/16 12:16:35 oburn
\* \Removing all reference to mailing lists
\* \$Log: config_misc\.xml,v $
\* Revision 1\.7 2007/01/16 12:16:35 oburn
\* Removing all reference to mailing lists
\* \
\* \Revision 1.6 2005/12/25 16:13:10 o_sukhodolsky
\* \Fix for rfe 1248106 (TYPECAST is now accepted by NoWhitespaceAfter)
\* Revision 1.6 2005/12/25 16:13:10 o_sukhodolsky
\* Fix for rfe 1248106 \(TYPECAST is now accepted by NoWhitespaceAfter\)
\* \
\* \Fix for rfe 953266 (thanks to Paul Guyot (pguyot) for submitting patch)
\* \IllegalType can be configured to accept some abstract classes which
\* \matches to regexp of illegal type names (property legalAbstractClassNames)
\* \
\* \TrailingComment now can be configured to accept some trailing comments
\* \(such as NOI18N) (property legalComment, rfe 1385344).
\* \
\* \Revision 1.5 2005/11/06 11:54:12 oburn
\* \Incorporate excellent patch [ 1344344 ] Consolidation of regexp checks.
\* Fix for rfe 953266 \(thanks to Paul Guyot \(pguyot\) for submitting patch\)
\* IllegalType can be configured to accept some abstract classes which
\* matches to regexp of illegal type names \(property legalAbstractClassNames\)
\*
\* TrailingComment now can be configured to accept some trailing comments
\* \(such as NOI18N\) \(property legalComment, rfe 1385344\).
\*
\* Revision 1.5 2005/11/06 11:54:12 oburn
\* Incorporate excellent patch \[ 1344344 \] Consolidation of regexp checks.
\* \\n(.*\n)*([\w|\s]*( class | interface )\1)&quot;/&gt;
&lt;property name=&quot;message&quot; value=&quot;Correct header not found&quot;/&gt;
&lt;/module&gt;

View File

@ -1516,7 +1516,7 @@ import com.puppycrawl.tools.
</p>
<source>
&lt;module name=&quot;NoLineWrap&quot;&gt;
&lt;property name="tokens" value="IMPORT"&gt;
&lt;property name="tokens" value="IMPORT"/&gt;
&lt;/module&gt;
</source>
<p>