A LiveView-aware Credo plugin.
soundcheck links a Phoenix LiveView application's callbacks, HEEx templates, and JavaScript hooks into one semantic graph per run, then checks the contracts between them, for example "this template emits an event that no handler accepts".
Plugin usage
Add the plugin to .credo.exs:
%{configs: [%{
name: "default",
plugins: [{Soundcheck, []}]
}]}Semantic checks read compiled modules, so run mix compile before
mix credo, for example through a Mix alias:
lint: ["compile", "credo --strict"]See docs/architecture.md for the design.
Summary
Functions
Credo plugin callback. Starts the :soundcheck application, which owns
the run cache, empties the cache, registers the default check config, builds the graph before the suggest and diff
commands run their checks, and empties the cache again when Credo halts.