Documentation
¶
Overview ¶
Package astutil contains shared, type-aware helpers for analysis passes.
Index ¶
- func DisabledRulesInDomain(domain string) []string
- func ExprStmtCall(n ast.Node) (*ast.CallExpr, bool)
- func FilesScanned(pkgs []*packages.Package) int
- func FuncName(decl *ast.FuncDecl) string
- func IsMethodOn(pass *analysis.Pass, call *ast.CallExpr, pkgPath, typeName, methodName string) bool
- func IsPkgFunc(pass *analysis.Pass, call *ast.CallExpr, pkgPath, name string) bool
- func RegisterDisabledRule(rule, name string, severity finding.Severity, reason string)
- func RegisterRule(rule, name string, severity finding.Severity)
- func Report(pass *analysis.Pass, pos token.Pos, rule, tmpl string, args ...any)
- func RuleName(rule string) string
- func RuleSeverity(rule string) finding.Severity
- func RulesInDomain(domain string) []string
- func StringLit(e ast.Expr) (string, bool)
- func TypeString(pass *analysis.Pass, e ast.Expr) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisabledRulesInDomain ¶
DisabledRulesInDomain returns calibrated-off rule IDs in domain order.
func ExprStmtCall ¶
ExprStmtCall extracts a call expression from an expression statement.
func FilesScanned ¶
FilesScanned counts unique compiled files across packages.
func IsMethodOn ¶
IsMethodOn reports whether call resolves to a method on the named type.
func RegisterDisabledRule ¶
RegisterDisabledRule records a calibrated rule without exposing or emitting it.
func RegisterRule ¶
RegisterRule registers one domain rule and panics on conflicting metadata.
func RuleSeverity ¶
RuleSeverity returns the registered severity for rule.
func RulesInDomain ¶
RulesInDomain returns registered rule IDs in domain order.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.