Documentation
¶
Index ¶
Constants ¶
View Source
const ( SeverityWarning = "warning" SeverityError = "error" CodeDeadRule = "dead-rule" CodeDeadFlow = "dead-flow" CodeMissingInverse = "missing-inverse" CodeMissingConcurrency = "missing-concurrency" CodeMissingCapability = "missing-capability" CodeOverbroadCapability = "overbroad-capability" CodeMissingResources = "missing-resources" CodeUnsafeExpression = "unsafe-expression" CodeDivisionByZero = "division-by-zero" CodeEmptyFactPath = "empty-fact-path" CodeUnusedBinding = "unused-binding" CodeBindingNoReturn = "binding-no-return" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Issue ¶
Issue represents a linter finding.
func LintFile ¶
func LintFile(file *ast.File, path string, verbs VerbLookup) []Issue
LintFile runs lint checks on a parsed file.
func LintFileWithOptions ¶
func LintFileWithOptions(file *ast.File, path string, verbs VerbLookup, options LintOptions) []Issue
LintFileWithOptions runs lint checks with custom options.
type LintOptions ¶
type LintOptions struct {
UnsafeMode UnsafeMode
VerbMode VerbMode
}
LintOptions configures lint behavior.
func DefaultOptions ¶
func DefaultOptions() LintOptions
DefaultOptions returns the default lint options.
type UnsafeMode ¶
type UnsafeMode string
UnsafeMode controls how unsafe expression usage is reported.
const ( UnsafeIgnore UnsafeMode = "ignore" UnsafeWarn UnsafeMode = "warn" UnsafeError UnsafeMode = "error" )
func ParseUnsafeMode ¶
func ParseUnsafeMode(raw string) (UnsafeMode, error)
ParseUnsafeMode parses a string into UnsafeMode.
type VerbLookup ¶
VerbLookup provides access to verb specifications.
type VerbMode ¶
type VerbMode string
VerbMode controls how verb-related lint issues are reported.
func ParseVerbMode ¶
ParseVerbMode parses a string into VerbMode.
Click to show internal directories.
Click to hide internal directories.