public abstract class AbstractAlwaysTrueOrFalseConditionCheck extends SeCheck
| Constructor and Description |
|---|
AbstractAlwaysTrueOrFalseConditionCheck() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConditions(Map<Tree,Collection<Constraint>> conditions) |
protected void |
conditionWithDeadCode(Tree condition,
boolean isTruthy,
Set<Tree> deadCode)
Implement this to react (raise an issue, update a metric...) to dead code
|
protected void |
redundantCondition(Tree condition,
boolean isTruthy)
Implement this to react (raise an issue, update a metric...) to gratuitous boolean conditions
|
void |
startOfExecution(Scope functionScope) |
addIssue, addIssue, addLineIssue, afterBlockElement, beforeBlockElement, endOfExecution, endOfFile, getContext, scanFile, setContext, startOfFile, toStringpublic AbstractAlwaysTrueOrFalseConditionCheck()
public void startOfExecution(Scope functionScope)
startOfExecution in class SeCheckpublic void checkConditions(Map<Tree,Collection<Constraint>> conditions)
checkConditions in class SeCheckprotected void conditionWithDeadCode(Tree condition, boolean isTruthy, Set<Tree> deadCode)
condition - isTruthy - deadCode - protected void redundantCondition(Tree condition, boolean isTruthy)
condition - isTruthy - Copyright © 2011–2017 SonarSource and Eriks Nukis. All rights reserved.