diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-26 12:19:34 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-26 12:19:34 -0300 |
| commit | 075683ff44a254e99adbad8a0372ef80ff06151a (patch) | |
| tree | 648289c8485afc6f003a3f719fb937c21f149311 /Makefile | |
| download | elixir-075683ff44a254e99adbad8a0372ef80ff06151a.tar.gz | |
Initial importv0.1.0
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e5501e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +# Development tasks. Everything runs through `mix`, so there is nothing to +# install first: the library has no dependencies. +# +# make list the targets +# make test run the ExUnit suite +# make lint mix format --check-formatted, no files touched +# make build compile with warnings as errors +MIX ?= mix + +.DEFAULT_GOAL := help +.PHONY: help test lint format build check clean + +help: + @echo 'Targets:' + @echo ' test run the ExUnit suite' + @echo ' lint mix format --check-formatted (read-only)' + @echo ' format apply mix format (writes)' + @echo ' build compile with warnings as errors' + @echo ' check lint + test + build, in that order' + @echo ' clean remove build artefacts' + +test: + $(MIX) test + +# Read-only by design, so it is safe in CI and in a pre-commit hook: it reports +# what `make format` would change without changing anything. +lint: + $(MIX) format --check-formatted + +format: + $(MIX) format + +build: + $(MIX) compile --warnings-as-errors + +# The order matters: lint is the fastest to fail, build the slowest, so a +# broken run reports the cheapest problem first. +check: lint test build + +clean: + rm -rf _build deps doc cover |