class LineLengthRule extends AbstractAstVisitorRule
Checks the maximum length for each line of source code. It checks for number of characters, so lines that include tabs may appear longer than the allowed number when viewing the file. The maximum line length can be configured by setting the length property, which defaults to 120.
Fields inherited from class | Fields |
---|---|
class AbstractAstVisitorRule |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME |
Type | Name and description |
---|---|
boolean |
ignoreImportStatements |
java.lang.String |
ignoreLineRegex |
boolean |
ignorePackageStatements |
int |
length |
java.lang.String |
name |
int |
priority |
Constructor and description |
---|
LineLengthRule
() |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
applyTo(SourceCode sourceCode, java.util.List<Violation> violations) |
Groovy Documentation