Package org.sonar.javascript.checks
Class GratuitousConditionCheck
- java.lang.Object
-
- org.sonar.javascript.se.SeCheck
-
- org.sonar.javascript.checks.AbstractAlwaysTrueOrFalseConditionCheck
-
- org.sonar.javascript.checks.GratuitousConditionCheck
-
- All Implemented Interfaces:
JavaScriptCheck
public class GratuitousConditionCheck extends AbstractAlwaysTrueOrFalseConditionCheck
-
-
Constructor Summary
Constructors Constructor Description GratuitousConditionCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidredundantCondition(Tree condition, boolean isTruthy)Implement this to react (raise an issue, update a metric...) to gratuitous boolean conditions-
Methods inherited from class org.sonar.javascript.checks.AbstractAlwaysTrueOrFalseConditionCheck
checkConditions, conditionWithDeadCode, startOfExecution
-
Methods inherited from class org.sonar.javascript.se.SeCheck
addIssue, addIssue, addLineIssue, afterBlockElement, beforeBlockElement, cleanupAndStartFileAnalysis, endOfExecution, endOfFile, getContext, scanFile, setContext, startOfFile, toString
-
-
-
-
Method Detail
-
redundantCondition
protected void redundantCondition(Tree condition, boolean isTruthy)
Description copied from class:AbstractAlwaysTrueOrFalseConditionCheckImplement this to react (raise an issue, update a metric...) to gratuitous boolean conditions- Overrides:
redundantConditionin classAbstractAlwaysTrueOrFalseConditionCheck
-
-