Skip to content

Commit

Permalink
Fix the way linting works for packages (#3198)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Feb 23, 2023
1 parent eeaa783 commit 25e2c45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/linting/lint-changed-go-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -euo pipefail
function lint_modified_go_files() {
local go_files="$(git diff --name-only | grep \.go$)"
for f in $go_files; do
golangci-lint run "${f}" --fix --out-format=tab --issues-exit-code=0
local dir_name="$(dirname $f)"
golangci-lint run "${dir_name}" --fix --out-format=tab --issues-exit-code=0
done
}

Expand Down

0 comments on commit 25e2c45

Please sign in to comment.