Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyRuleFixes ¶
func ApplyRuleFixes[M LintMessage](code string, diagnostics []M) (string, []M, bool)
func RunLinter ¶
func RunLinter(programs []*compiler.Program, singleThreaded bool, allowFiles []string, getRulesForFile func(sourceFile *ast.SourceFile) []ConfiguredRule, onDiagnostic func(diagnostic rule.RuleDiagnostic)) (int32, error)
when allowedFiles is passed as nil which means all files are allowed when allowedFiles is passed as slice, only files in the slice are allowed
Types ¶
type ConfiguredRule ¶
type ConfiguredRule struct {
Name string
Severity rule.DiagnosticSeverity
Run func(ctx rule.RuleContext) rule.RuleListeners
}
type LintMessage ¶
Click to show internal directories.
Click to hide internal directories.