Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoExAssignRule = rule.Rule{ Name: "no-ex-assign", RequiresTypeInfo: true, Run: func(ctx rule.RuleContext, options any) rule.RuleListeners { return rule.RuleListeners{ ast.KindCatchClause: func(node *ast.Node) { if node.AsCatchClause().VariableDeclaration == nil { return } varDecl := node.AsCatchClause().VariableDeclaration.AsVariableDeclaration() if varDecl == nil || varDecl.Name() == nil { return } block := node.AsCatchClause().Block if block == nil { return } names, symbols := collectCatchBindingNamesAndSymbols(varDecl.Name(), ctx) checkReassignments(block, names, symbols, ctx) }, } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.