mix optimum.heex_check (OptimumCredo v0.5.0)
View SourceRuns HardcodedAssetPath, HiddenIdInput and EventNameSnakeCase over raw .heex files.
Stock mix credo drops .heex files (it parses them as Elixir), so this task is the entry
point for standalone templates. See OptimumCredo.HeexCheck for how files are matched and
read.
mix optimum.heex_check [PATH_OR_GLOB ...] [options]Without paths, lib/**/*.heex is used. Directories are searched recursively.
Options
--format text|json- output format (defaulttext)--checks A,B- comma-separated check names (repeatable); default all--exclude PATH_OR_GLOB- repeatable--prefix /images/- repeatable,HardcodedAssetPathasset prefixes--allowed-field locale_id- repeatable,HiddenIdInputaccepted fields--allowed-event my-hook- repeatable,EventNameSnakeCaseaccepted names--advisory- findings do not change the exit status (real errors still do)
Exit status
0 clean (or only findings with --advisory), 1 findings, 2 usage, read, path or check
errors. JSON output is {"files": [...], "findings": [...], "errors": [...], "notes": [...]}.
Summary
Functions
Runs the task without printing or halting; returns {exit_status, output}.