mix dsxir. check. no_eval
(dsxir v0.2.0)
Copy Markdown
CI invariant: forbid runtime evaluation/compilation in the dynamic-program code paths.
Scans:
lib/dsxir/runtime_program/lib/dsxir/predicate/lib/dsxir/program/source.exlib/dsxir/program/source/runtime_program.ex
For these forbidden patterns:
Code.eval_string,Code.eval_quotedCode.compile_string,Code.compile_quotedModule.create:erl_evalString.to_atom(predicate parser must useString.to_existing_atom/1)
Run via mix dsxir.check.no_eval. Exits with status 1 on any hit.
The repository CI workflow (.github/workflows/build_and_test.yaml) invokes
mix check, which in turn runs the custom tool registered in .check.exs
for this task. Local runs can use the task directly.
Summary
Functions
Scan all configured paths and return a flat list of {file, line, pattern} hits.
Scan a single path (file or directory) and return any hits.
Functions
@spec scan_all() :: [{Path.t(), pos_integer(), String.t()}]
Scan all configured paths and return a flat list of {file, line, pattern} hits.
@spec scan_path_explicit(Path.t()) :: [{Path.t(), pos_integer(), String.t()}]
Scan a single path (file or directory) and return any hits.
Returns [] when the path does not exist. For directories, every *.ex
file beneath it is scanned recursively.