module

Flaw::AstBackend

AST-backed analysis tier. Parses a source file with Crystal::Parser (same path Ameba uses) and dispatches AstRule instances through a shared visitor. Regex rules remain the default substrate — AST rules opt in by subclassing AstRule instead of Rule. Files that fail to parse are skipped by this tier and still get regex coverage.

Class methods

available?
Source
parse(source : String) : Crystal::ASTNode | Nil

Parses source. Returns nil on any parse error so callers can fall back to regex-only without aborting the whole scan.

Source
run(rules : Array(AstRule), source : String, path : String) : Array(Finding)
Source

Nested types