Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(make): add clean, fmt, lint #46

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,67 @@ define docker_build_push
--provenance=false \
--push
endef

##@ Other

.PHONY: clean
clean: ## Perform a `cargo` clean and remove the binary directory.
cargo clean
rm -rf $(BIN_DIR)

fmt:
cargo +nightly fmt

lint-odyssey:
cargo +nightly clippy \
--workspace \
--bin "odyssey" \
--lib \
--tests \
--benches \
--features "$(FEATURES)" \
-- -D warnings

lint-other-targets:
cargo +nightly clippy \
--workspace \
--lib \
--tests \
--benches \
--all-features \
-- -D warnings

lint:
make fmt && \
make lint-odyssey && \
make lint-other-targets

fix-lint-odyssey:
cargo +nightly clippy \
--workspace \
--bin "odyssey" \
--lib \
--tests \
--benches \
--features "$(FEATURES)" \
--fix \
--allow-staged \
--allow-dirty \
-- -D warnings

fix-lint-other-targets:
cargo +nightly clippy \
--workspace \
--lib \
--tests \
--benches \
--all-features \
--fix \
--allow-staged \
--allow-dirty \
-- -D warnings

fix-lint:
make fix-lint-odyssey && \
make fix-lint-other-targets && \
make fmt