Skip to content

Commit

Permalink
add script to run go linter on all go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lostbean committed Dec 6, 2023
1 parent afec4a4 commit 7a8e927
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/go-lint-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail # Bash "strict mode"
script_dirpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
root_dirpath="$(dirname "${script_dirpath}")"

find $root_dirpath -type f -name 'go.mod' -exec sh -c 'dir=$(dirname "{}") && cd "$dir" && echo "$dir" && golangci-lint run' \;

0 comments on commit 7a8e927

Please sign in to comment.