All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.puppycrawl.tools.checkstyle.meta.checks.coding.OneStatementPerLineCheck.xml Maven / Gradle / Ivy

Go to download

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard

There is a newer version: 8.8
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle-metadata>
   <module>
      <check fully-qualified-name="com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck"
             name="OneStatementPerLine"
             parent="com.puppycrawl.tools.checkstyle.TreeWalker">
         <description>&lt;div&gt;
 Checks that there is only one statement per line.
 &lt;/div&gt;

 &lt;p&gt;
 Rationale: It's very difficult to read multiple statements on one line.
 &lt;/p&gt;

 &lt;p&gt;
 In the Java programming language, statements are the fundamental unit of
 execution. All statements except blocks are terminated by a semicolon.
 Blocks are denoted by open and close curly braces.
 &lt;/p&gt;

 &lt;p&gt;
 OneStatementPerLineCheck checks the following types of statements:
 variable declaration statements, empty statements, import statements,
 assignment statements, expression statements, increment statements,
 object creation statements, 'for loop' statements, 'break' statements,
 'continue' statements, 'return' statements, resources statements (optional).
 &lt;/p&gt;</description>
         <properties>
            <property default-value="false"
                      name="treatTryResourcesAsStatement"
                      type="boolean">
               <description>Enable resources processing.</description>
            </property>
         </properties>
         <message-keys>
            <message-key key="multiple.statements.line"/>
         </message-keys>
      </check>
   </module>
</checkstyle-metadata>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy