diff --git a/ChangeLog b/ChangeLog index b0e723883..297f6e2b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-08-05 Oliver Burn + + * src/checkstyle/com/puppycrawl/tools/checkstyle/VerifierImpl.java, src/checkstyle/com/puppycrawl/tools/checkstyle/Defn.java, src/checkstyle/com/puppycrawl/tools/checkstyle/Configuration.java: + Added support for public member patterns. + 2001-07-02 Oliver Burn * docs/index.html: Added that can ignore checking braces. diff --git a/build.xml b/build.xml index 42e48f1cf..aafa639af 100644 --- a/build.xml +++ b/build.xml @@ -1,233 +1,234 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/anttask.html b/docs/anttask.html index 7f66f9d46..69af375ee 100644 --- a/docs/anttask.html +++ b/docs/anttask.html @@ -16,9 +16,9 @@ This task is included in the checkstyle distribution.

Installation

-

The easiest way is to include checkstyle-all-1.1.jar in the classpath. This contains all the classes required to run checkstyle. Alternatively, you must include the following in the classpath:

+

The easiest way is to include checkstyle-all-@@VERSION@@.jar in the classpath. This contains all the classes required to run checkstyle. Alternatively, you must include the following in the classpath:

    -
  1. checkstyle-1.1.jar
  2. +
  3. checkstyle-@@VERSION@@.jar
  4. ANTLR 2.7.1 classes. antlr.jar is included in the distribution.
  5. Jakarta Regexp 1.2 classes. jakarta-regexp-1.2.jar is included in the distribution.
@@ -43,77 +43,82 @@ This task is included in the checkstyle distribution.

One of either file or at least one nested fileset element - allowtabs + allowTabs Indicates whether to allow tabs. Defaults to "false". No - allowprotected + allowProtected Indicates whether to allow protected data. Defaults to "false". No - allownoauthor + allowNoAuthor Indicates whether to allow no @author tag to be defined for class and interface Javadoc comments. Defaults to "false". No - maxlinelen + maxLineLen Specifies the maximum line length. Default value is defined here. No - memberpattern + memberPattern Specifies the regular expression to match against member variables. Default value is defined here. No - parampattern + publicMemberPattern + Specifies the regular expression to match against public member variables. Default value is defined here. + No + + + paramPattern Specifies the regular expression to match against parameters. Default value is defined here. No - constpattern + constPattern Specifies the regular expression to match against static/final variables. Default value is defined here. No - staticpattern + staticPattern Specifies the regular expression to match against static variables. Default value is defined here. No - typepattern + typePattern Specifies the regular expression to match against type names. Default value is defined here. No - headerfile + headerFile Specifies the file containing the header lines. Default is to not check. No - headerignoreline + headerIgnoreLine Specifies the line in the header to ignore when comparing. Default it to not ignore any line. No - relaxjavadoc + relaxJavadoc Specifies whether to relax checking Javadoc comments. Defaults to "false". No - ignoreimports + ignoreImports Specifies whether to ignore checking import statements. Defaults to "false". No - ignorewhitespace + ignoreWhitespace Specifies whether to ignore checking whitespace. Defaults to "false". No - ignorebraces + ignoreBraces Specifies whether to ignore checking braces. Defaults to "false". No @@ -134,18 +139,18 @@ This task is included in the checkstyle distribution.

Run checkstyle on a set of Java files and allow tabs

-  <checkstyle allowtabs="yes">
+  <checkstyle allowTabs="yes">
     <fileset dir="src/checkstyle" includes="**/*.java"/>
   </checkstyle>
 

Run checkstyle on a set of Java files and disable pattern matching

-  <checkstyle allowtabs="yes">
-              parampattern="."
-              constpattern="."
-              staticpattern="."
-              memberpattern="."
+  <checkstyle allowTabs="yes">
+              paramPattern="."
+              constPattern="."
+              staticPattern="."
+              memberPattern="."
     <fileset dir="src/checkstyle" includes="**/*.java"/>
   </checkstyle>
 
diff --git a/docs/cmdline.html b/docs/cmdline.html index 930219f31..3a04b50da 100644 --- a/docs/cmdline.html +++ b/docs/cmdline.html @@ -18,9 +18,9 @@ This command line tool is included in the checkstyle distribution.

Installation

-

The easiest way is to include checkstyle-all-1.0.jar in the classpath. This contains all the classes required to run checkstyle. Alternatively, you must include the following in the classpath:

+

The easiest way is to include checkstyle-all-@@VERSION@@.jar in the classpath. This contains all the classes required to run checkstyle. Alternatively, you must include the following in the classpath:

    -
  1. checkstyle-1.0.jar
  2. +
  3. checkstyle-@@VERSION@@.jar
  4. ANTLR 2.7.1 classes. antlr.jar is included in the distribution.
  5. Jakarta Regexp 1.2 classes. jakarta-regexp-1.2.jar is included in the distribution.
@@ -59,6 +59,10 @@ This command line tool is included in the checkstyle distribution.

checkstyle.pattern.member Specifies the regular expression to match against member variables. Default value is defined here. + + checkstyle.pattern.publicmember + Specifies the regular expression to match against public member variables. Default value is defined here. + checkstyle.pattern.parameter Specifies the regular expression to match against parameters. Default value is defined here. diff --git a/docs/index.html b/docs/index.html index 80516bf24..d28074d29 100644 --- a/docs/index.html +++ b/docs/index.html @@ -169,6 +169,11 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%; ^m[A-Z][a-zA-Z0-9]*$ private int mNumCreated = 0; + + non static public + ^f[A-Z][a-zA-Z0-9]*$ + public int fCMPField; + @@ -185,6 +190,11 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%;

Note: you can turn on allowing protected data members.

+
+

Tip

+

Container Managed Persistence EJBs require that managed fields are declared public. This will cause checkstyle to complain that the fields should be declared private. Hence checkstyle supports ignoring public that match a specified regular expression. The default is ^f[A-Z][a-zA-Z0-9]*$.

+
+

White space

Checks for the following use of white space: