Skip to content

Commit 1d25ca5

Browse files
authored
chore(Makefile): add .PHONY, fix help formatting (#10686)
1 parent b42d512 commit 1d25ca5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

Makefile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
# Cargo profile for builds.
77
PROFILE ?= dev
8+
89
# The docker image name
910
DOCKER_IMAGE_NAME ?= ghcr.io/foundry-rs/foundry:latest
11+
1012
BIN_DIR = dist/bin
1113
CARGO_TARGET_DIR ?= target
1214

@@ -22,7 +24,7 @@ endif
2224

2325
.PHONY: help
2426
help: ## Display this help.
25-
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
27+
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
2628

2729
##@ Build
2830

@@ -90,24 +92,28 @@ test: ## Run all tests.
9092

9193
##@ Linting
9294

95+
.PHONY: fmt
9396
fmt: ## Run all formatters.
9497
cargo +nightly fmt
9598
./.github/scripts/format.sh --check
9699

100+
.PHONY: lint-clippy
97101
lint-clippy: ## Run clippy on the codebase.
98102
cargo +nightly clippy \
99103
--workspace \
100104
--all-targets \
101105
--all-features \
102106
-- -D warnings
103107

108+
.PHONY: lint-codespell
104109
lint-codespell: ## Run codespell on the codebase.
105110
@command -v codespell >/dev/null || { \
106111
echo "codespell not found. Please install it by running the command `pipx install codespell` or refer to the following link for more information: https://github.com/codespell-project/codespell" \
107112
exit 1; \
108113
}
109114
codespell --skip "*.json"
110115

116+
.PHONY: lint
111117
lint: ## Run all linters.
112118
make fmt && \
113119
make lint-clippy && \
@@ -119,6 +125,12 @@ lint: ## Run all linters.
119125
clean: ## Clean the project.
120126
cargo clean
121127

122-
pr: ## Run all tests and linters in preparation for a PR.
128+
.PHONY: deny
129+
deny: ## Perform a `cargo` deny check.
130+
cargo deny --all-features check all
131+
132+
.PHONY: pr
133+
pr: ## Run all checks and tests.
134+
make deny && \
123135
make lint && \
124-
make test
136+
make test

0 commit comments

Comments
 (0)