Skip to main content

Module lints

Module lints 

Source
Expand description

Static lint passes complementary to the pointer checker.

Each lint:

  • consumes the fully-compiled CompiledScript objects (read-only),
  • emits Diagnostics at Severity::Warning,
  • never feeds back into codegen or the script writer.

Currently included:

  1. check_unused_locals — any local variable (including parameters) that is declared/written but never read.
  2. check_unreachable_code — any source statement whose emitted instructions are unreachable from node 0 of the CFG.

Both lints attach help/suggestion blocks where the fix is mechanical enough to print a before/after diff; otherwise they fall back to a prose message.

Functions§

run_lints