Skip to content

Commit 97c8e01

Browse files
committed
Add some clearer output to make targets
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
1 parent 97bd308 commit 97c8e01

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

GNUmakefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,19 @@ endif
2929
default: build
3030

3131
bin/golangci-lint:
32+
@echo "==> Installing golangci-lint..."
3233
mkdir -p $(BIN)
3334
GOBIN=$(BIN) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.10.1
3435

3536
tools_go_files = $(shell find tools \( -name '*.go' -or -name '*.mod' -or -name '*.sum' \) -and -not -name '*_test.go' -maxdepth 4)
3637
bin/custom-gcl: bin/golangci-lint $(tools_go_files)
37-
$(BIN)/golangci-lint custom --name custom-gcl --destination $(BIN)
38+
@echo "==> Building custom-gcl..."
39+
@$(BIN)/golangci-lint custom --name custom-gcl --destination $(BIN)
3840

3941
tools: bin/custom-gcl go.sum
4042

4143
go.sum: go.mod $(shell find github -name '*.go')
42-
go mod tidy
44+
@go mod tidy
4345

4446
build: lintcheck
4547
CGO_ENABLED=0 go build -ldflags="-s -w" ./...
@@ -58,16 +60,16 @@ lintcheck: tools
5860
$(BIN)/custom-gcl run ./...
5961

6062
.golangci.new.yml: .golangci.yml .golangci.strict.yml
61-
yq eval-all 'select(fileIndex == 0) *+ select(fileIndex == 1)' .golangci.yml .golangci.strict.yml > .golangci.new.yml
63+
@yq eval-all 'select(fileIndex == 0) *+ select(fileIndex == 1)' .golangci.yml .golangci.strict.yml > .golangci.new.yml
6264

6365
lintcheck-new: tools .golangci.new.yml
6466
@branch=$$(git rev-parse --abbrev-ref HEAD); \
65-
printf "==> Checking source code against linters on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿"
67+
printf "==> Checking changed source code against linters on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿"
6668
$(BIN)/custom-gcl run ./... --new-from-merge-base main --config .golangci.new.yml
6769

6870
lintcheck-strict: tools .golangci.new.yml
6971
@branch=$$(git rev-parse --abbrev-ref HEAD); \
70-
printf "==> Checking source code against linters on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿"
72+
printf "==> Checking source code against strict linters on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿"
7173
$(BIN)/custom-gcl run ./... --config .golangci.new.yml
7274

7375
test:

0 commit comments

Comments
 (0)