Package org.sonar.javascript.checks
Class NestedControlFlowDepthCheck
- java.lang.Object
-
- org.sonar.plugins.javascript.api.visitors.DoubleDispatchVisitor
-
- org.sonar.plugins.javascript.api.visitors.DoubleDispatchVisitorCheck
-
- org.sonar.javascript.checks.NestedControlFlowDepthCheck
-
- All Implemented Interfaces:
JavaScriptCheck,TreeVisitor
public class NestedControlFlowDepthCheck extends DoubleDispatchVisitorCheck
-
-
Field Summary
Fields Modifier and Type Field Description intmaximumNestingLevel
-
Constructor Summary
Constructors Constructor Description NestedControlFlowDepthCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaximumNestingLevel()voidvisitDoWhileStatement(DoWhileStatementTree tree)voidvisitForObjectStatement(ForObjectStatementTree tree)voidvisitForStatement(ForStatementTree tree)voidvisitIfStatement(IfStatementTree tree)voidvisitScript(ScriptTree tree)voidvisitSwitchStatement(SwitchStatementTree tree)voidvisitTryStatement(TryStatementTree tree)voidvisitWhileStatement(WhileStatementTree tree)-
Methods inherited from class org.sonar.plugins.javascript.api.visitors.DoubleDispatchVisitorCheck
addIssue, addIssue, addLineIssue, scanFile
-
Methods inherited from class org.sonar.plugins.javascript.api.visitors.DoubleDispatchVisitor
getContext, scan, scan, scanChildren, scanTree, visitAccessorMethodDeclaration, visitArgumentList, visitArrayAssignmentPattern, visitArrayBindingPattern, visitArrayLiteral, visitArrowFunction, visitAssignmentExpression, visitAssignmentPatternRestElement, visitBinaryExpression, visitBindingProperty, visitBlock, visitBreakStatement, visitCallExpression, visitCaseClause, visitCatchBlock, visitClass, visitComment, visitComputedPropertyName, visitConditionalExpression, visitContinueStatement, visitDebugger, visitDecorator, visitDefaultClause, visitDefaultExportDeclaration, visitElseClause, visitEmptyStatement, visitExportClause, visitExportDefaultBinding, visitExportDefaultBindingWithExportList, visitExportDefaultBindingWithNameSpaceExport, visitExpressionStatement, visitExtendsClause, visitFieldDeclaration, visitFinallyBlock, visitFlowArrayTypeShorthand, visitFlowArrayTypeWithKeywordTree, visitFlowCastingExpression, visitFlowDeclare, visitFlowFunctionSignature, visitFlowFunctionType, visitFlowFunctionTypeParameter, visitFlowFunctionTypeParameterClause, visitFlowGenericParameter, visitFlowGenericParameterClause, visitFlowImplementsClause, visitFlowInterfaceDeclaration, visitFlowIntersectionType, visitFlowLiteralType, visitFlowMethodPropertyDefinitionKey, visitFlowModule, visitFlowModuleExports, visitFlowNamespacedType, visitFlowObjectTypeTree, visitFlowOpaqueType, visitFlowOptionalBindingElement, visitFlowOptionalType, visitFlowParameterizedGenerics, visitFlowParenthesisedType, visitFlowPropertyType, visitFlowPropertyTypeKey, visitFlowSimpleType, visitFlowTupleType, visitFlowTypeAliasStatement, visitFlowTypeAnnotation, visitFlowTypedBindingElement, visitFlowTypeofType, visitFlowUnionType, visitFromClause, visitFunctionDeclaration, visitFunctionExpression, visitIdentifier, visitImport, visitImportClause, visitImportDeclaration, visitImportModuleDeclaration, visitInitializedAssignmentPatternElement, visitInitializedBindingElement, visitJsxClosingElement, visitJsxEmptyClosingElement, visitJsxEmptyOpeningElement, visitJsxIdentifier, visitJsxJavaScriptExpression, visitJsxOpeningElement, visitJsxSelfClosingElement, visitJsxShortFragmentElement, visitJsxSpreadAttribute, visitJsxStandardAttribute, visitJsxStandardElement, visitJsxText, visitLabelledStatement, visitLiteral, visitMemberExpression, visitMethodDeclaration, visitModule, visitNamedExportDeclaration, visitNamedImportExportClause, visitNameSpaceExportDeclaration, visitNameSpaceImport, visitNewExpression, visitNewTarget, visitObjectAssignmentPattern, visitObjectAssignmentPatternPairElement, visitObjectBindingPattern, visitObjectLiteral, visitPairProperty, visitParameterList, visitParenthesisedExpression, visitRestElement, visitReturnStatement, visitSpecifier, visitSpreadElement, visitSuper, visitTaggedTemplate, visitTemplateCharacters, visitTemplateExpression, visitTemplateLiteral, visitThrowStatement, visitToken, visitUnaryExpression, visitVariableDeclaration, visitVariableStatement, visitWithStatement, visitYieldExpression
-
-
-
-
Method Detail
-
getMaximumNestingLevel
public int getMaximumNestingLevel()
-
visitScript
public void visitScript(ScriptTree tree)
- Overrides:
visitScriptin classDoubleDispatchVisitor
-
visitIfStatement
public void visitIfStatement(IfStatementTree tree)
- Overrides:
visitIfStatementin classDoubleDispatchVisitor
-
visitForStatement
public void visitForStatement(ForStatementTree tree)
- Overrides:
visitForStatementin classDoubleDispatchVisitor
-
visitForObjectStatement
public void visitForObjectStatement(ForObjectStatementTree tree)
- Overrides:
visitForObjectStatementin classDoubleDispatchVisitor
-
visitWhileStatement
public void visitWhileStatement(WhileStatementTree tree)
- Overrides:
visitWhileStatementin classDoubleDispatchVisitor
-
visitDoWhileStatement
public void visitDoWhileStatement(DoWhileStatementTree tree)
- Overrides:
visitDoWhileStatementin classDoubleDispatchVisitor
-
visitSwitchStatement
public void visitSwitchStatement(SwitchStatementTree tree)
- Overrides:
visitSwitchStatementin classDoubleDispatchVisitor
-
visitTryStatement
public void visitTryStatement(TryStatementTree tree)
- Overrides:
visitTryStatementin classDoubleDispatchVisitor
-
-