Credence.Syntax.Rule behaviour
(credence v0.4.1)
Copy Markdown
Behaviour for syntax-level rules that fix code which won't parse.
These rules work on raw source strings (no AST available). Each rule detects a known LLM syntax error pattern and can fix it.
Summary
Callbacks
Detect issues in unparseable source. Returns list of issues.
Attempt to fix the source. Returns the (possibly modified) source.
Callbacks
@callback analyze(source :: String.t()) :: [Credence.Issue.t()]
Detect issues in unparseable source. Returns list of issues.
Attempt to fix the source. Returns the (possibly modified) source.
@callback priority() :: integer()