mix just_bash.audit (JustBash v0.4.0)
View SourceScans Elixir source for filesystem call shapes that the 0.3 → 0.4
migration broke in ways the compiler cannot catch (see UPGRADING.md).
The legacy patterns still compile and then misbehave at runtime:
| Rule | Legacy shape | Failure mode in 0.4 |
|---|---|---|
legacy_module | JustBash.Fs / InMemoryFs reference | compile error (undefined module) |
stale_ok_tuple | {:ok, x} matched on a read | silently falls through to the error clause |
atom_error | {:error, :enoent} clause | never matches; falls to catch-all or crashes |
exists_truthy | FS.exists?/2 in a condition | tuple is always truthy — branch always taken |
legacy_opt | mkdir recursive: / rm force: | raises ArgumentError at runtime |
stat_boolean_field | stat.is_file etc. | KeyError at runtime |
fs_data_access | bash.fs.data | KeyError — bash.fs is a %VFS{} |
Calls are recognized on the JustBash.FS module, a discovered
alias JustBash.FS[, as: ...], or the bare FS name (heuristic).
mix just_bash.audit # scans lib/
mix just_bash.audit lib test # scans multiple paths
mix just_bash.audit path/to/file.exPrints one line per finding (file:line [rule] message) and exits
non-zero when anything is found, so it can gate CI.
This task exists for the 0.3 → 0.4 migration window and will be removed once the legacy shapes are gone.