Modifier and Type | Method and Description |
---|---|
protected List<Violation> |
AbstractSourceAnalyzer.collectViolations(SourceCode sourceCode,
RuleSet ruleSet) |
protected boolean |
FilesystemSourceAnalyzer.matches(SourceCode sourceFile) |
Constructor and Description |
---|
SuppressionAnalyzer(SourceCode source) |
Modifier and Type | Method and Description |
---|---|
SourceCode |
AbstractAstVisitor.getSourceCode() |
protected SourceCode |
AbstractMethodCallExpressionVisitor.getSourceCode() |
protected SourceCode |
AbstractMethodVisitor.getSourceCode() |
protected SourceCode |
AbstractFieldVisitor.getSourceCode() |
Modifier and Type | Method and Description |
---|---|
List<Violation> |
Rule.applyTo(SourceCode sourceCode)
Apply this rule to the specified source and return a list of violations (or an empty List)
|
List<Violation> |
AbstractRule.applyTo(SourceCode sourceCode)
Apply this rule to the specified source and return a list of violations (or an empty List).
|
void |
StubRule.applyTo(SourceCode sourceCode,
List violations) |
void |
AbstractSharedAstVisitorRule.applyTo(SourceCode sourceCode,
List violations) |
abstract void |
AbstractRule.applyTo(SourceCode sourceCode,
List<Violation> violations)
Apply this rule to the specified source and return a list of violations (or an empty List)
|
void |
AbstractAstVisitorRule.applyTo(SourceCode sourceCode,
List<Violation> violations) |
protected void |
AbstractSharedAstVisitorRule.applyVisitor(AstVisitor visitor,
SourceCode sourceCode) |
protected Violation |
AbstractRule.createViolation(SourceCode sourceCode,
org.codehaus.groovy.ast.ASTNode node)
Deprecated.
|
protected Violation |
AbstractRule.createViolation(SourceCode sourceCode,
org.codehaus.groovy.ast.ASTNode node,
String message)
Create a new Violation for the AST node.
|
protected Violation |
AbstractRule.createViolationForImport(SourceCode sourceCode,
org.codehaus.groovy.ast.ImportNode importNode)
Deprecated.
|
protected Violation |
AbstractRule.createViolationForImport(SourceCode sourceCode,
org.codehaus.groovy.ast.ImportNode importNode,
String message)
Create and return a new Violation for this rule and the specified import
|
protected Violation |
AbstractRule.createViolationForImport(SourceCode sourceCode,
String className,
String alias,
String violationMessage)
Create and return a new Violation for this rule and the specified import className and alias
|
protected AstVisitor |
AbstractSharedAstVisitorRule.getAstVisitor(SourceCode sourceCode)
Subclasses can override to provide an AstVisitor with SourceCode or AST-specific initialization.
|
protected abstract List<Violation> |
AbstractSharedAstVisitorRule.getViolations(AstVisitor astVisitor,
SourceCode sourceCode) |
void |
AstVisitor.setSourceCode(SourceCode sourceCode) |
void |
AbstractAstVisitor.setSourceCode(SourceCode sourceCode) |
void |
AbstractMethodCallExpressionVisitor.setSourceCode(SourceCode sourceCode)
Set the SourceCode associated with this visitor
|
void |
AbstractMethodVisitor.setSourceCode(SourceCode sourceCode)
Set the SourceCode associated with this visitor
|
void |
AbstractFieldVisitor.setSourceCode(SourceCode sourceCode)
Set the SourceCode associated with this visitor
|
Modifier and Type | Method and Description |
---|---|
void |
EmptyClassRule.applyTo(SourceCode sourceCode,
List<Violation> violations) |
Modifier and Type | Method and Description |
---|---|
void |
NoDefRule.applyTo(SourceCode sourceCode,
List<Violation> violations) |
Modifier and Type | Method and Description |
---|---|
protected List<Violation> |
PrivateFieldCouldBeFinalRule.getViolations(AstVisitor visitor,
SourceCode sourceCode) |
Modifier and Type | Method and Description |
---|---|
void |
ConsecutiveBlankLinesRule.applyTo(SourceCode sourceCode,
List violations) |
void |
MissingBlankLineAfterPackageRule.applyTo(SourceCode sourceCode,
List violations) |
void |
FileEndsWithoutNewlineRule.applyTo(SourceCode sourceCode,
List violations) |
void |
ClassJavadocRule.applyTo(SourceCode sourceCode,
List violations) |
void |
TrailingWhitespaceRule.applyTo(SourceCode sourceCode,
List violations) |
void |
BlankLineBeforePackageRule.applyTo(SourceCode sourceCode,
List violations) |
void |
MissingBlankLineAfterImportsRule.applyTo(SourceCode sourceCode,
List violations) |
void |
LineLengthRule.applyTo(SourceCode sourceCode,
List violations) |
void |
BracesForClassRule.applyTo(SourceCode sourceCode,
List violations) |
protected String |
ClassJavadocRule.sourceCodeNameWithoutExtension(SourceCode sourceCode) |
Modifier and Type | Method and Description |
---|---|
void |
IllegalStringRule.applyTo(SourceCode sourceCode,
List violations) |
void |
RequiredStringRule.applyTo(SourceCode sourceCode,
List violations) |
void |
IllegalRegexRule.applyTo(SourceCode sourceCode,
List violations) |
void |
RequiredRegexRule.applyTo(SourceCode sourceCode,
List violations) |
Modifier and Type | Method and Description |
---|---|
Object |
ImportFromSunPackagesRule.addViolationForSunImport(org.codehaus.groovy.ast.ImportNode importNode,
SourceCode sourceCode,
List violations) |
void |
NoWildcardImportsRule.applyTo(SourceCode sourceCode,
List violations) |
void |
ImportFromSunPackagesRule.applyTo(SourceCode sourceCode,
List violations) |
void |
UnusedImportRule.applyTo(SourceCode sourceCode,
List violations) |
void |
UnnecessaryGroovyImportRule.applyTo(SourceCode sourceCode,
List violations) |
void |
ImportFromSamePackageRule.applyTo(SourceCode sourceCode,
List violations) |
void |
DuplicateImportRule.applyTo(SourceCode sourceCode,
List violations) |
void |
MisorderedStaticImportsRule.applyTo(SourceCode sourceCode,
List violations) |
protected void |
AbstractImportRule.eachImportLine(SourceCode sourceCode,
groovy.lang.Closure closure) |
protected Object |
AbstractImportRule.findLineNumberOfFirstClassDeclaration(SourceCode sourceCode) |
Modifier and Type | Method and Description |
---|---|
void |
PackageNameMatchesFilePathRule.applyTo(SourceCode sourceCode,
List<Violation> violations) |
void |
ClassNameSameAsFilenameRule.applyTo(SourceCode sourceCode,
List<Violation> violations) |
Constructor and Description |
---|
GMetricsSourceCodeAdapter(SourceCode sourceCode) |
Modifier and Type | Method and Description |
---|---|
void |
UnnecessarySemicolonRule.applyTo(SourceCode sourceCode,
List violations) |
Modifier and Type | Method and Description |
---|---|
void |
UnusedVariableRule.applyTo(SourceCode sourceCode,
List violations) |
protected AstVisitor |
UnusedPrivateMethodRule.getAstVisitor(SourceCode sourceCode) |
protected AstVisitor |
UnusedPrivateFieldRule.getAstVisitor(SourceCode sourceCode) |
protected List<Violation> |
UnusedPrivateMethodRule.getViolations(AstVisitor visitor,
SourceCode sourceCode) |
protected List<Violation> |
UnusedPrivateFieldRule.getViolations(AstVisitor visitor,
SourceCode sourceCode) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractSourceCode |
class |
CustomCompilerPhaseSourceDecorator |
class |
SourceFile |
class |
SourceString |
Modifier and Type | Method and Description |
---|---|
boolean |
SourceCodeCriteria.matches(SourceCode sourceCode) |
Constructor and Description |
---|
CustomCompilerPhaseSourceDecorator(SourceCode delegate,
int compilerPhase) |
Modifier and Type | Method and Description |
---|---|
static int |
AstUtil.findFirstNonAnnotationLine(org.codehaus.groovy.ast.ASTNode node,
SourceCode sourceCode)
gets the first non annotation line number of a node, taking into account annotations.
|
static String |
AstUtil.getDeclaration(org.codehaus.groovy.ast.ASTNode node,
SourceCode sourceCode) |
static String |
AstUtil.getNodeText(org.codehaus.groovy.ast.ASTNode expression,
SourceCode sourceCode) |
static String |
AstUtil.getRawLine(SourceCode sourceCode,
int lineNumber) |
static boolean |
AstUtil.isFinalVariable(org.codehaus.groovy.ast.expr.DeclarationExpression declarationExpression,
SourceCode sourceCode)
Return true if the DeclarationExpression represents a 'final' variable declaration.
|
static List<String> |
SourceCodeUtil.nodeSourceLines(SourceCode source,
org.codehaus.groovy.ast.ASTNode node) |
static Map |
ImportUtil.sourceLineAndNumberForImport(SourceCode sourceCode,
org.codehaus.groovy.ast.ImportNode importNode) |
static Map |
ImportUtil.sourceLineAndNumberForImport(SourceCode sourceCode,
String className,
String alias) |
static Map |
ImportUtil.sourceLineAndNumberForNonStarImport(SourceCode sourceCode,
org.codehaus.groovy.ast.ImportNode importNode) |
static Map |
ImportUtil.sourceLineAndNumberForStarImport(SourceCode sourceCode,
org.codehaus.groovy.ast.ImportNode importNode) |
static List<String> |
SourceCodeUtil.sourceLinesBetween(SourceCode source,
int startLine,
int startColumn,
int endLine,
int endColumn) |
static List<String> |
SourceCodeUtil.sourceLinesBetweenNodes(SourceCode source,
org.codehaus.groovy.ast.ASTNode startNode,
org.codehaus.groovy.ast.ASTNode endNode) |
Copyright © 2022. All rights reserved.