From 7781985a342a5a3a05df42f073548067a701e7f1 Mon Sep 17 00:00:00 2001
From: Oliver Burn
Date: Mon, 12 Aug 2002 07:40:29 +0000
Subject: [PATCH] Request 582144: added documentation.
---
docs/anttask.html | 6 ++++++
docs/cmdline.html | 7 +++++++
docs/engine.html | 3 +++
docs/releasenotes.html | 1 +
.../com/puppycrawl/tools/checkstyle/AuditEvent.java | 2 ++
.../com/puppycrawl/tools/checkstyle/Verifier.java | 1 -
6 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/docs/anttask.html b/docs/anttask.html
index b9e11f8e8..c68121f38 100644
--- a/docs/anttask.html
+++ b/docs/anttask.html
@@ -150,6 +150,12 @@ This task is included in the checkstyle distribution.
No |
+
+ | maxParameters |
+ Specifies the maximum number of parameters. Default value is defined here. |
+ No |
+
+
| todoPattern |
Specifies the regular expression to match for to-do comments. Default value is defined here. |
diff --git a/docs/cmdline.html b/docs/cmdline.html
index 71385a517..70aecdcf6 100644
--- a/docs/cmdline.html
+++ b/docs/cmdline.html
@@ -129,10 +129,17 @@ This command line tool is included in the checkstyle distribution.
checkstyle.maxfilelen |
Specifies the maximum file length. Default value is defined here. |
+
+
+ | checkstyle.maxparameters |
+ Specifies the maximum number of parameters. Default value is defined here. |
+
+
| checkstyle.pattern.todo |
Specifies the regular expression to match for to-do comments. Default value is defined here. |
+
| checkstyle.pattern.member |
Specifies the regular expression to match against member variables. Default value is defined here. |
diff --git a/docs/engine.html b/docs/engine.html
index 1b5f965fc..4900a74be 100644
--- a/docs/engine.html
+++ b/docs/engine.html
@@ -205,6 +205,9 @@
Tab characters
Checks for lines that contain tab ('\t') characters. This can be turned off.
+
+Checks for the number of parameters in a declaration being greater than a specified amount. The default is "7".
+
Checks for comments that contain a specified regular expression. The default is "TODO:".
diff --git a/docs/releasenotes.html b/docs/releasenotes.html
index 218600b0b..d0be92b13 100644
--- a/docs/releasenotes.html
+++ b/docs/releasenotes.html
@@ -42,6 +42,7 @@
New features:
+ - Detect the number of parameters in a declaration exceeding a specified amount (request 582144).
- Inspired by patch 580410 from Shinya Ohnuma, now the error message are localised.
- Support checking to determine if an unused @throws exception is a subclass of java.lang.Error (request 583719).
- Incorporate patch 590931 from Vijay Aravamudhan to improve documentation of the build.xml file.
diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/AuditEvent.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/AuditEvent.java
index 75b6067d0..af8cf2f05 100644
--- a/src/checkstyle/com/puppycrawl/tools/checkstyle/AuditEvent.java
+++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/AuditEvent.java
@@ -40,6 +40,7 @@ public class AuditEvent
{
/** filename event associated with **/
private final String mFileName;
+ /** message associated with the event **/
private final LocalizedMessage mMessage;
/**
@@ -109,6 +110,7 @@ public class AuditEvent
return mMessage.getColumnNo();
}
+ /** @return the localized message **/
public LocalizedMessage getLocalizedMessage()
{
return mMessage;
diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/Verifier.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/Verifier.java
index c804c23a5..4e7e26bd7 100644
--- a/src/checkstyle/com/puppycrawl/tools/checkstyle/Verifier.java
+++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/Verifier.java
@@ -257,7 +257,6 @@ class Verifier
checkModOrder(aSig.getModSet());
// Check for to many parameters
- // TODO: Add documentation and a test
if (aSig.getParams().size() > mConfig.getMaxParameters()) {
log(aSig.getFirstLineNo(),
aSig.getFirstColNo(),