| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <document xmlns="http://maven.apache.org/XDOC/2.0" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd"> |
| |
| <head> |
| <title>Naming Conventions</title> |
| <script type="text/javascript" |
| src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/> |
| <script type="text/javascript" src="js/anchors.js"/> |
| <script type="text/javascript" src="js/google-analytics.js"/> |
| <link rel="icon" href="images/favicon.png" type="image/x-icon" /> |
| <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" /> |
| </head> |
| |
| <body> |
| <section name="Content"> |
| <macro name="toc"> |
| <param name="fromDepth" value="1"/> |
| <param name="toDepth" value="1"/> |
| </macro> |
| </section> |
| |
| <section name="Overview"> |
| <p> |
| Each of these naming modules validates identifiers for particular code |
| elements. Valid identifiers for a naming module are specified by its |
| <code> format</code> property. The value of <code>format</code> is a <a |
| href="https://docs.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html"> |
| regular expression</a> for valid identifiers. |
| </p> |
| </section> |
| |
| <section name="AbbreviationAsWordInName"> |
| <p>Since Checkstyle 5.8</p> |
| <subsection name="Description" id="AbbreviationAsWordInName_Description"> |
| <p> |
| The Check validate abbreviations(consecutive capital letters) |
| length in identifier name, it also allows to enforce camel case naming. Please read more at |
| <a href="http://checkstyle.sourceforge.net/reports/google-java-style-20170228.html#s5.3-camel-case"> |
| Google Style Guide</a> |
| to get to know how to avoid long abbreviations in names. |
| </p> |
| |
| <p> |
| <code>allowedAbbreviationLength</code> specifies how many consecutive capital letters are |
| allowed in the identifier. |
| A value of <i>3</i> indicates that up to 4 consecutive capital letters are allowed, |
| one after the other, before a violation is printed. The identifier 'MyTEST' would be |
| allowed, but 'MyTESTS' would not be. |
| A value of <i>0</i> indicates that only 1 consecutive capital letter is allowed. This |
| is what should be used to enforce strict camel casing. The identifier 'MyTest' would |
| be allowed, but 'MyTEst' would not be. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="AbbreviationAsWordInName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>allowedAbbreviationLength</td> |
| <td>Indicate the number of consecutive capital letters allowed in targeted |
| identifiers (abbreviations in the classes, interfaces, variables and methods |
| names, ... ).</td> |
| <td><a href="property_types.html#integer">Integer</a></td> |
| <td><code>3</code></td> |
| <td>5.8</td> |
| </tr> |
| <tr> |
| <td>allowedAbbreviations</td> |
| <td>Specify list of abbreviations that must be skipped for checking. |
| Abbreviations should be separated by comma.</td> |
| <td><a href="property_types.html#stringSet">String Set</a></td> |
| <td><code>{}</code></td> |
| <td>5.8</td> |
| </tr> |
| <tr> |
| <td>ignoreFinal</td> |
| <td>Allow to skip variables with <code>final</code> modifier.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.8</td> |
| </tr> |
| <tr> |
| <td>ignoreStatic</td> |
| <td>Allow to skip variables with <code>static</code> modifier.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.8</td> |
| </tr> |
| <tr> |
| <td>ignoreOverriddenMethods</td> |
| <td>Allow to ignore methods tagged with <code>@Override</code> annotation |
| (that usually mean inherited name).</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.8</td> |
| </tr> |
| <tr> |
| <td>tokens</td> |
| <td>tokens to check</td> |
| <td> |
| subset of tokens |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF"> |
| CLASS_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF"> |
| INTERFACE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF"> |
| ENUM_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF"> |
| ANNOTATION_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF"> |
| ANNOTATION_FIELD_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF"> |
| PARAMETER_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF"> |
| VARIABLE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF"> |
| METHOD_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF"> |
| ENUM_CONSTANT_DEF</a>. |
| </td> |
| <td> |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF"> |
| CLASS_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF"> |
| INTERFACE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF"> |
| ENUM_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF"> |
| ANNOTATION_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF"> |
| ANNOTATION_FIELD_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF"> |
| PARAMETER_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF"> |
| VARIABLE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF"> |
| METHOD_DEF</a>. |
| </td> |
| <td>5.8</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="AbbreviationAsWordInName_Examples"> |
| <p> |
| Default configuration |
| </p> |
| <source> |
| <module name="AbbreviationAsWordInName"/> |
| </source> |
| <p> |
| To configure to check variables and classes identifiers, |
| do not ignore variables with static modifier and allow |
| no abbreviations (enforce camel case phrase) and |
| allow no abbreviations to use (camel case phrase) and allow XML and URL abbreviations. |
| </p> |
| <source> |
| <module name="AbbreviationAsWordInName"> |
| <property name="tokens" value="VARIABLE_DEF,CLASS_DEF"/> |
| <property name="ignoreStatic" value="false"/> |
| <property name="allowedAbbreviationLength" value="1"/> |
| <property name="allowedAbbreviations" value="XML,URL"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="AbbreviationAsWordInName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+AbbreviationAsWordInName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+AbbreviationAsWordInName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="AbbreviationAsWordInName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22abbreviation.as.word%22"> |
| abbreviation.as.word</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="AbbreviationAsWordInName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="AbbreviationAsWordInName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="AbstractClassName"> |
| <p>Since Checkstyle 3.2</p> |
| <subsection name="Description" id="AbstractClassName_Description"> |
| <p> |
| Ensures that the names of abstract classes conforming to some regular expression and |
| check that <code>abstract</code> modifier exists. |
| </p> |
| <p> |
| Rationale: Abstract classes are convenience base class implementations of |
| interfaces, not types as such. As such they should be named to indicate this. |
| Also if names of classes starts with 'Abstract' it's very convenient that |
| they will have abstract modifier. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="AbstractClassName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specify valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^Abstract.+$"</code></td> |
| <td>3.2</td> |
| </tr> |
| <tr> |
| <td>ignoreModifier</td> |
| <td> |
| Control whether to ignore checking for the |
| <code>abstract</code> modifier on classes that match the |
| name. |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>false</code></td> |
| <td>5.3</td> |
| </tr> |
| <tr> |
| <td>ignoreName</td> |
| <td> |
| Control whether to ignore checking the name. Realistically |
| only useful if using the check to identify that match name |
| and do not have the <code>abstract</code> modifier. |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>false</code></td> |
| <td>5.3</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="AbstractClassName_Examples"> |
| <p> |
| The following example shows how to configure the |
| <code>AbstractClassName</code> to checks names, but ignore |
| missing <code>abstract</code> modifiers: |
| </p> |
| <p>Configuration:</p> |
| <source> |
| <module name="AbstractClassName"> |
| <property name="ignoreModifier" value="true"/> |
| </module> |
| </source> |
| <p>Example:</p> |
| <pre> |
| abstract class AbstractFirstClass {} // OK |
| abstract class SecondClass {} // violation, it should match the pattern "^Abstract.+$" |
| class AbstractThirdClass {} // OK, no "abstract" modifier |
| </pre> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="AbstractClassName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+AbstractClassName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="AbstractClassName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.abstract.class.name%22"> |
| illegal.abstract.class.name</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22no.abstract.class.modifier%22"> |
| no.abstract.class.modifier</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="AbstractClassName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="AbstractClassName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="CatchParameterName"> |
| <p>Since Checkstyle 6.14</p> |
| <subsection name="Description" id="CatchParameterName_Description"> |
| <p> |
| Checks that <code>catch</code> parameter names conform to a format specified by the |
| format property. |
| </p> |
| <p> |
| Default pattern has the following characteristic: |
| </p> |
| <ul> |
| <li>allows names beginning with two lowercase letters followed by at least one uppercase |
| or lowercase letter</li> |
| <li>allows <code>e</code> abbreviation (suitable for exceptions end errors)</li> |
| <li>allows <code>ex</code> abbreviation (suitable for exceptions)</li> |
| <li>allows <code>t</code> abbreviation (suitable for throwables)</li> |
| <li>prohibits numbered abbreviations like <code>e1</code> or <code>t2</code></li> |
| <li>prohibits one letter prefixes like <code>pException</code></li> |
| <li>prohibits two letter abbreviations like <code>ie</code> or <code>ee</code></li> |
| <li>prohibits any other characters than letters</li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Properties" id="CatchParameterName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td> |
| <a href="property_types.html#regexp">Regular Expression</a> |
| </td> |
| <td> |
| <code>"^(e|t|ex|[a-z][a-z][a-zA-Z]+)$"</code> |
| </td> |
| <td>6.14</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="CatchParameterName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="CatchParameterName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that begin with |
| a lower case letter, followed by any letters or digits is: |
| </p> |
| <p>Configuration:</p> |
| <source> |
| <module name="CatchParameterName"> |
| <property name="format" value="^[a-z][a-zA-Z0-9]+$"/> |
| </module> |
| </source> |
| <p>Example:</p> |
| <pre> |
| public class MyTest { |
| public void myTest() { |
| try { |
| // ... |
| } catch (ArithmeticException ex) { //OK |
| // ... |
| } catch (ArrayIndexOutOfBoundsException ex2) { //OK |
| // ... |
| } catch (IOException thirdException) { //OK |
| // ... |
| } catch (Exception FourthException) { // violation, the initial letter |
| // should be lowercase |
| // ... |
| } |
| } |
| } |
| </pre> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="CatchParameterName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+CatchParameterName"> |
| Google Style |
| </a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+CatchParameterName"> |
| Checkstyle Style |
| </a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="CatchParameterName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="CatchParameterName_Package"> |
| <p>com.puppycrawl.tools.checkstyle.checks.naming</p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="CatchParameterName_Parent_Module"> |
| <p> |
| <a href="config.html#TreeWalker">TreeWalker</a> |
| </p> |
| </subsection> |
| </section> |
| |
| <section name="ClassTypeParameterName"> |
| <p>Since Checkstyle 5.0</p> |
| <subsection name="Description" id="ClassTypeParameterName_Description"> |
| <p>Checks that class type parameter names conform to a format specified by the format |
| property.</p> |
| </subsection> |
| |
| <subsection name="Properties" id="ClassTypeParameterName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[A-Z]$"</code></td> |
| <td>5.0</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="ClassTypeParameterName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="ClassTypeParameterName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that are only a single letter is: |
| </p> |
| <p>Configuration:</p> |
| <source> |
| <module name="ClassTypeParameterName"> |
| <property name="format" value="^[a-zA-Z]$"/> |
| </module> |
| </source> |
| <p>Example:</p> |
| <pre> |
| class MyClass1<T> {} // OK |
| class MyClass2<t> {} // OK |
| class MyClass3<abc> {} // violation, the class type parameter |
| // name should match the regular expression "^[a-zA-Z]$" |
| </pre> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="ClassTypeParameterName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ClassTypeParameterName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ClassTypeParameterName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="ClassTypeParameterName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="ClassTypeParameterName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="ClassTypeParameterName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="ConstantName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="ConstantName_Description"> |
| <p> |
| Checks that constant names conform to a format specified by the format property. |
| A <em>constant</em> is a <strong>static</strong> and <strong>final</strong> field or an |
| interface/annotation field, except <strong>serialVersionUID</strong> and |
| <strong>serialPersistentFields</strong>. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="ConstantName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>applyToPublic</td> |
| <td>Controls whether to apply the check to public member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToProtected</td> |
| <td>Controls whether to apply the check to protected member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToPackage</td> |
| <td> |
| Controls whether to apply the check to package-private member. |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToPrivate</td> |
| <td>Controls whether to apply the check to private member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="ConstantName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| |
| <source> |
| <module name="ConstantName"/> |
| </source> |
| <p> |
| The following configuration apart from names allowed by default allows <code>log</code> |
| or <code>logger</code>: |
| </p> |
| |
| <source> |
| <module name="ConstantName"> |
| <property name="format" |
| value="^log(ger)?|[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="ConstantName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ConstantName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ConstantName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="ConstantName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="ConstantName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="ConstantName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="InterfaceTypeParameterName"> |
| <p>Since Checkstyle 5.8</p> |
| <subsection name="Description" id="InterfaceTypeParameterName_Description"> |
| <p> |
| Checks that interface type parameter names conform to a format specified by the format |
| property. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="InterfaceTypeParameterName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[A-Z]$"</code></td> |
| <td>5.8</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="InterfaceTypeParameterName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="InterfaceTypeParameterName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that are only a single |
| letter is: |
| </p> |
| <source> |
| <module name="InterfaceTypeParameterName"> |
| <property name="format" value="^[a-zA-Z]$"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="InterfaceTypeParameterName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+InterfaceTypeParameterName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+InterfaceTypeParameterName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="InterfaceTypeParameterName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="InterfaceTypeParameterName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="InterfaceTypeParameterName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="LambdaParameterName"> |
| <p>Since Checkstyle 8.11</p> |
| <subsection name="Description" id="LambdaParameterName_Description"> |
| <p> |
| Check to verify lambda parameter names. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="LambdaParameterName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z][a-zA-Z0-9]*$"</code></td> |
| <td>8.11</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="LambdaParameterName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| |
| <source> |
| <module name="LambdaParameterName"/> |
| </source> |
| |
| <p> |
| An example of how to configure the check for names that begin with a lower case letter, |
| followed by letters is: |
| </p> |
| <source> |
| <module name="LambdaParameterName"> |
| <property name="format" value="^[a-z]([a-zA-Z]+)*$"/> |
| </module> |
| </source> |
| <p>Example of checking with this config:</p> |
| <source> |
| public class TestClass { |
| |
| Function<String, String> function1 = str -> str.toUpperCase().trim(); |
| |
| Function<String, String> function2 = _s -> _s.trim().toUpperCase(); // violation |
| |
| public boolean testMethod(String sentence) { |
| return Stream.of(sentence.split(" ")) |
| .map(word -> word.trim()) |
| .anyMatch(Word -> "in".equals(Word)); // violation |
| } |
| |
| } |
| </source> |
| |
| </subsection> |
| |
| <subsection name="Example of Usage" id="LambdaParameterName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+LambdaParameterName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+LambdaParameterName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="LambdaParameterName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="LambdaParameterName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="LambdaParameterName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="LocalFinalVariableName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="LocalFinalVariableName_Description"> |
| <p> |
| Checks that local final variable names conform to a format specified |
| by the format property. A catch parameter and resources in try statements |
| are considered to be a local, final variables. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="LocalFinalVariableName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z][a-zA-Z0-9]*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>tokens</td> |
| <td>tokens to check</td> |
| <td> |
| subset of tokens |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF"> |
| VARIABLE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF"> |
| PARAMETER_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RESOURCE"> |
| RESOURCE</a>. |
| </td> |
| <td> |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF"> |
| VARIABLE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF"> |
| PARAMETER_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RESOURCE"> |
| RESOURCE</a>. |
| </td> |
| <td>3.0</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="LocalFinalVariableName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="LocalFinalVariableName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that are only upper case letters and |
| digits is: |
| </p> |
| <source> |
| <module name="LocalFinalVariableName"> |
| <property name="format" value="^[A-Z][A-Z0-9]*$"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="LocalFinalVariableName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+LocalFinalVariableName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+LocalFinalVariableName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="LocalFinalVariableName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="LocalFinalVariableName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="LocalFinalVariableName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="LocalVariableName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="LocalVariableName_Description"> |
| <p> |
| Checks that local, non-<code>final</code> variable names conform to a format specified |
| by the format property. A catch parameter is considered to be a local variable. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="LocalVariableName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z][a-zA-Z0-9]*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>allowOneCharVarInForLoop</td> |
| <td> |
| Allow one character variable name in |
| <a href="https://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html"> |
| initialization expressions</a> in FOR loop. For example: |
| <pre> |
| for (int i = 1; i < 10; i++) {} |
| </pre> |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>false</code></td> |
| <td>5.8</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="LocalVariableName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| |
| <source> |
| <module name="LocalVariableName"/> |
| </source> |
| |
| <p> |
| An example of how to configure the check for names that begin with a lower |
| case letter, followed by letters, digits, and underscores is: |
| </p> |
| <source> |
| <module name="LocalVariableName"> |
| <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/> |
| </module> |
| </source> |
| |
| <p> |
| An example of one character variable name in initialization expression(like "i") |
| in FOR loop: |
| </p> |
| <source> |
| for(int i = 1; i < 10; i++) {} |
| </source> |
| <p> |
| An example of how to configure the check to allow one character variable name in |
| <a href="https://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html"> |
| initialization expressions</a> in FOR loop: |
| </p> |
| <source> |
| <module name="LocalVariableName"> |
| <property name="allowOneCharVarInForLoop" value="true"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="LocalVariableName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+LocalVariableName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+LocalVariableName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+LocalVariableName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="LocalVariableName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="LocalVariableName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="LocalVariableName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="MemberName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="MemberName_Description"> |
| <p> |
| Checks that instance variable names conform to a format specified by the format property. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="MemberName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z][a-zA-Z0-9]*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>applyToPublic</td> |
| <td>Controls whether to apply the check to public member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>3.4</td> |
| </tr> |
| <tr> |
| <td>applyToProtected</td> |
| <td>Controls whether to apply the check to protected member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>3.4</td> |
| </tr> |
| <tr> |
| <td>applyToPackage</td> |
| <td> |
| Controls whether to apply the check to package-private member. |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>3.4</td> |
| </tr> |
| <tr> |
| <td>applyToPrivate</td> |
| <td>Controls whether to apply the check to private member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>3.4</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="MemberName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="MemberName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that begin with |
| <code>"m"</code>, followed by an upper case letter, and then letters and |
| digits is: |
| </p> |
| |
| <source> |
| <module name="MemberName"> |
| <property name="format" value="^m[A-Z][a-zA-Z0-9]*$"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="MemberName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MemberName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MemberName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MemberName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="MemberName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="MemberName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="MemberName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="MethodName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="MethodName_Description"> |
| <p> |
| Checks that method names conform to a format specified by the format property. |
| </p> |
| <p> |
| Also, checks if a method name has the same name as the residing class. |
| The default is false (it is not allowed). It is legal in Java to have |
| method with the same name as a class. As long as a return type is specified |
| it is a method and not a constructor which it could be easily confused as. |
| Does not check-style the name of an overridden methods because the developer |
| does not have a choice in renaming such methods. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="MethodName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z][a-zA-Z0-9]*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>allowClassName</td> |
| <td> |
| Controls whether to allow a method name to have the same |
| name as the residing class name. This is not to be confused |
| with a constructor. An easy mistake is to place a return |
| type on a constructor declaration which turns it into a |
| method. For example: |
| <pre> |
| class MyClass { |
| public void MyClass() {} //this is a method |
| public MyClass() {} //this is a constructor |
| } |
| </pre> |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>false</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToPublic</td> |
| <td>Controls whether to apply the check to public member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.1</td> |
| </tr> |
| <tr> |
| <td>applyToProtected</td> |
| <td>Controls whether to apply the check to protected member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.1</td> |
| </tr> |
| <tr> |
| <td>applyToPackage</td> |
| <td> |
| Controls whether to apply the check to package-private member. |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.1</td> |
| </tr> |
| <tr> |
| <td>applyToPrivate</td> |
| <td>Controls whether to apply the check to private member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.1</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="MethodName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="MethodName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that begin with a lower case letter, |
| followed by letters, digits, and underscores is: |
| </p> |
| <source> |
| <module name="MethodName"> |
| <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/> |
| </module> |
| </source> |
| <p> |
| An example of how to configure the check to allow method names to be equal to the |
| residing class name is: |
| </p> |
| <source> |
| <module name="MethodName"> |
| <property name="allowClassName" value="true"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="MethodName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MethodName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MethodName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MethodName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="MethodName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22method.name.equals.class.name%22"> |
| method.name.equals.class.name</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="MethodName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="MethodName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="MethodTypeParameterName"> |
| <p>Since Checkstyle 5.0</p> |
| <subsection name="Description" id="MethodTypeParameterName_Description"> |
| <p> |
| Checks that method type parameter names conform to a format specified by the format |
| property. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="MethodTypeParameterName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[A-Z]$"</code></td> |
| <td>5.0</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="MethodTypeParameterName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="MethodTypeParameterName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that are only a single letter is: |
| </p> |
| <source> |
| <module name="MethodTypeParameterName"> |
| <property name="format" value="^[a-zA-Z]$"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="MethodTypeParameterName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MethodTypeParameterName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MethodTypeParameterName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="MethodTypeParameterName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="MethodTypeParameterName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="MethodTypeParameterName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="PackageName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="PackageName_Description"> |
| <p> |
| Checks that package names conform to a format specified by the format property. |
| </p> |
| |
| <p> |
| The default value of <code>format</code> for module <code>PackageName</code> has been |
| chosen to match the requirements in the <a |
| href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.5.3">Java |
| Language specification</a> and the Sun coding conventions. However |
| both underscores and uppercase letters are rather uncommon, so most |
| configurations should probably assign value <code>^[a-z]+(\.[a-z][a-z0-9]*)*$</code> to |
| <code>format</code> for module <code>PackageName</code>. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="PackageName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="PackageName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="PackageName"/> |
| </source> |
| <p> |
| An example of how to configure the check to ensure with packages start with a lowercase |
| letter and only contains lowercase letters or numbers is: |
| </p> |
| <source> |
| <module name="PackageName"> |
| <property name="format" |
| value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="PackageName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+PackageName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+PackageName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+PackageName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="PackageName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="PackageName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="PackageName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="ParameterName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="ParameterName_Description"> |
| <p> |
| Checks that method parameter names conform to a format specified |
| by the format property. By using <code>accessModifiers</code> property it is possible |
| to specify different formats for methods at different visibility levels. |
| </p> |
| <p> |
| To validate <code>catch</code> parameters please use |
| <a href="#CatchParameterName">CatchParameterName</a>. |
| </p> |
| <p> |
| To validate lambda parameters please use |
| <a href="#LambdaParameterName">LambdaParameterName</a>. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="ParameterName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z][a-zA-Z0-9]*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>ignoreOverridden</td> |
| <td> |
| Allows to skip methods with Override annotation from validation. For example, the |
| following method's parameter will be skipped from validation, if |
| ignoreOverridden is true: |
| <pre> |
| @Override |
| public boolean equals(Object o) { |
| return super.equals(o); |
| } |
| </pre> |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>false</code></td> |
| <td>6.12.1</td> |
| </tr> |
| <tr> |
| <td>accessModifiers</td> |
| <td>Access modifiers of methods where parameters are checked.</td> |
| <td><a href="property_types.html#access_modifiers">Access Modifier Set</a></td> |
| <td><code>public, protected, package, private</code></td> |
| <td>7.5</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="ParameterName_Examples"> |
| <p> |
| An example of how to configure the check: |
| </p> |
| <source> |
| <module name="ParameterName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that begin with a lower case letter, |
| followed by letters, digits, and underscores: |
| </p> |
| <source> |
| <module name="ParameterName"> |
| <property name="format" value="^[a-z][_a-zA-Z0-9]+$"/> |
| </module> |
| </source> |
| <p> |
| An example of how to configure the check to skip methods with Override annotation from |
| validation: |
| </p> |
| <source> |
| <module name="ParameterName"> |
| <property name="ignoreOverridden" value="true"/> |
| </module> |
| </source> |
| <p> |
| An example of how to configure the check for names that begin with |
| a lower case letter, followed by letters and digits is: |
| </p> |
| <source> |
| <module name="ParameterName"> |
| <property name="format" value="^[a-z][a-zA-Z0-9]+$"/> |
| </module> |
| </source> |
| <p> |
| The following configuration checks that the parameters always start with two |
| lowercase characters and, in addition, that public method parameters cannot be one |
| character long: |
| </p> |
| <source> |
| <module name="ParameterName"> |
| <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/> |
| <property name="accessModifiers" value="protected, package, private"/> |
| <message key="name.invalidPattern" |
| value="Parameter name ''{0}'' must match pattern ''{1}''"/> |
| </module> |
| <module name="ParameterName"> |
| <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/> |
| <property name="accessModifiers" value="public"/> |
| <message key="name.invalidPattern" |
| value="Parameter name ''{0}'' must match pattern ''{1}''"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="ParameterName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ParameterName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ParameterName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ParameterName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="ParameterName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="ParameterName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="ParameterName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="StaticVariableName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="StaticVariableName_Description"> |
| <p> |
| Checks that {@code static}, non-{@code final} variable names conform to a format |
| specified by the format property. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="StaticVariableName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[a-z][a-zA-Z0-9]*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>applyToPublic</td> |
| <td>Controls whether to apply the check to public member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToProtected</td> |
| <td>Controls whether to apply the check to protected member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToPackage</td> |
| <td> |
| Controls whether to apply the check to package-private member. |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToPrivate</td> |
| <td>Controls whether to apply the check to private member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="StaticVariableName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| <source> |
| <module name="StaticVariableName"/> |
| </source> |
| <p> |
| An example of how to configure the check for names that begin with a lower case letter, |
| followed by letters, digits, and underscores is: |
| </p> |
| <source> |
| <module name="StaticVariableName"> |
| <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="StaticVariableName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+StaticVariableName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+StaticVariableName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="StaticVariableName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="StaticVariableName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="StaticVariableName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| <section name="TypeName"> |
| <p>Since Checkstyle 3.0</p> |
| <subsection name="Description" id="TypeName_Description"> |
| <p> |
| Checks that type names for classes, interfaces, enums, and annotations conform to a |
| format specified by the format property. |
| </p> |
| </subsection> |
| |
| <subsection name="Properties" id="TypeName_Properties"> |
| <table> |
| <tr> |
| <th>name</th> |
| <th>description</th> |
| <th>type</th> |
| <th>default value</th> |
| <th>since</th> |
| </tr> |
| <tr> |
| <td>format</td> |
| <td>Specifies valid identifiers.</td> |
| <td><a href="property_types.html#regexp">Regular Expression</a></td> |
| <td><code>"^[A-Z][a-zA-Z0-9]*$"</code></td> |
| <td>3.0</td> |
| </tr> |
| <tr> |
| <td>applyToPublic</td> |
| <td>Controls whether to apply the check to public member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToProtected</td> |
| <td>Controls whether to apply the check to protected member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToPackage</td> |
| <td> |
| Controls whether to apply the check to package-private member. |
| </td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>applyToPrivate</td> |
| <td>Controls whether to apply the check to private member.</td> |
| <td><a href="property_types.html#boolean">Boolean</a></td> |
| <td><code>true</code></td> |
| <td>5.0</td> |
| </tr> |
| <tr> |
| <td>tokens</td> |
| <td>tokens to check</td> |
| <td> |
| subset of tokens |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF"> |
| CLASS_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF"> |
| INTERFACE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF"> |
| ENUM_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF"> |
| ANNOTATION_DEF</a>. |
| </td> |
| <td> |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF"> |
| CLASS_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF"> |
| INTERFACE_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF"> |
| ENUM_DEF</a>, |
| <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF"> |
| ANNOTATION_DEF</a>. |
| </td> |
| <td>3.0</td> |
| </tr> |
| </table> |
| </subsection> |
| |
| <subsection name="Examples" id="TypeName_Examples"> |
| <p> |
| An example of how to configure the check is: |
| </p> |
| |
| <source> |
| <module name="TypeName"/> |
| </source> |
| |
| <p> |
| An example of how to configure the check for names that begin with a lower case letter, |
| followed by letters, digits, and underscores is: |
| </p> |
| <source> |
| <module name="TypeName"> |
| <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/> |
| </module> |
| </source> |
| |
| <p> |
| The following configuration element ensures that |
| interface names begin with <code>"I_"</code>, followed by |
| letters and digits: |
| </p> |
| |
| <source> |
| <module name="TypeName"> |
| <property name="format" |
| value="^I_[a-zA-Z0-9]*$"/> |
| <property name="tokens" |
| value="INTERFACE_DEF"/> |
| </module> |
| </source> |
| </subsection> |
| |
| <subsection name="Example of Usage" id="TypeName_Example_of_Usage"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+TypeName"> |
| Google Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+TypeName"> |
| Sun Style</a> |
| </li> |
| <li> |
| <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+TypeName"> |
| Checkstyle Style</a> |
| </li> |
| </ul> |
| </subsection> |
| |
| <subsection name="Error Messages" id="TypeName_Error_Messages"> |
| <ul> |
| <li> |
| <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fnaming+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22name.invalidPattern%22"> |
| name.invalidPattern</a> |
| </li> |
| </ul> |
| <p> |
| All messages can be customized if the default message doesn't suit you. |
| Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to. |
| </p> |
| </subsection> |
| |
| <subsection name="Package" id="TypeName_Package"> |
| <p> com.puppycrawl.tools.checkstyle.checks.naming </p> |
| </subsection> |
| |
| <subsection name="Parent Module" id="TypeName_Parent_Module"> |
| <p> <a href="config.html#TreeWalker">TreeWalker</a> </p> |
| </subsection> |
| </section> |
| |
| </body> |
| </document> |