Checks the current project's cookbook (in composer itself, core):
- every step has a summary, an
actionand astability - every step has a test at
test/composer/<cookbook>/steps/<id>_test.exs - every step reference in
requiresresolves lib/composer/<cookbook>/manifest.exsis up to date- every recipe group is well formed (see
Composer.Lint) - every reference in every recipe resolves, and every recipe resolves as a whole
With --local, checks your local recipes instead: the config directory
holds only recipes/, every group is well formed and every recipe
resolves against the project's cookbooks.
With --file, checks one recipe group file, local or a cookbook's (found
from its path), and reports only the problems in that file, plus one at
each {:use, ...} of a recipe that has problems of its own. This is
what an editor runs on save; see the lint guide.
Exits non-zero when there is an error, in every format, so it can run in CI.
mix composer.cookbook.lint
mix composer.cookbook.lint --local
mix composer.cookbook.lint --format compact --file ~/.config/composer/recipes/ash.exs
mix composer.cookbook.lint --format githubFormats
text(default) - each problem after itspath:line:col:location, warnings first; errors make the task fail with the listcompact- one line per problem,file:line:col: severity: message [code], for editorsjson- an array of diagnosticsgithub- GitHub Actions annotations
In every format but text, stdout holds nothing but the diagnostics
(compiling runs quietly), and errors end the task with exit status 1.
Dependencies that need compiling are compiled by Mix before this task
starts; set MIX_QUIET=1 to silence that too.
Options
--local- lint your local recipes instead of the project's cookbook--file PATH- lint one recipe group file--format FORMAT-text,compact,jsonorgithub-c,--config- the local config directory (seeComposer.Local)