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

Add recursive lint #2204

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ jobs:
with:
working-directory: ${{matrix.package}}/
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.56.1
version: v1.56.2
# see: https://github.com/golangci/golangci-lint/issues/2654
args: --timeout=60m
env:
Expand Down
3 changes: 3 additions & 0 deletions make/repo.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ tidy: ## Runs go mod tidy on all go.mod files in the repo
go work sync
$(GIT_ROOT)/make/scripts/tidy.sh

lint-go: ## Runs make lint in all go.mod files in the repo.
$(GIT_ROOT)/make/scripts/lint.sh

docker-clean: ## stops and removes all containers at once
docker ps -aq | xargs docker stop | xargs docker rm
docker network prune
Expand Down
6 changes: 6 additions & 0 deletions make/scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

find . -name go.mod -print0 | while IFS= read -r -d '' f; do
echo "linting $(dirname "$f")"
(cd "$(dirname "$f")" || exit; go mod tidy)
done
trajan0x marked this conversation as resolved.
Show resolved Hide resolved
Loading