Documentation
¶
Overview ¶
Package linter runs warning-only static-analysis rules on write-back content. Since mache-73b885 the rules are SQL over the leyline daemon's emit_ast payload (SQL-shaped `_ast` rows from the SAME parse that validated the write) — no in-process tree-sitter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diagnostic ¶
Diagnostic is one warning-only lint finding. Line is 0-indexed.
func Lint ¶
func Lint(content []byte, langName string) ([]Diagnostic, error)
Lint checks the content for static analysis issues. Currently supports Go only; other languages return (nil, nil). It costs one leyline validate (emit_ast) round trip — callers that already hold an ASTPayload from the write path's validation should call LintAST instead to reuse that parse.
func LintAST ¶ added in v0.18.0
func LintAST(ast *leyline.ASTPayload) ([]Diagnostic, error)
LintAST runs the SQL rules over an already-parsed emit_ast payload — no daemon round trip. A nil payload (pass-through language, or a caller that validated without emit_ast) yields no diagnostics. Non-Go payloads yield no diagnostics: every current rule is Go-specific.
func (Diagnostic) String ¶
func (d Diagnostic) String() string