mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #1163 from ghodss/exclude_godeps_from_git_hook
Adding files to Godeps should not trigger gofmt or boilerplate warnings
This commit is contained in:
commit
2e35834e9a
@ -4,7 +4,7 @@ KUBE_HOOKS_DIR="$(dirname "$(test -L "$0" && echo "$(dirname $0)/$(readlink "$0"
|
||||
|
||||
files_need_gofmt=""
|
||||
files_need_boilerplate=""
|
||||
for file in $(git diff --cached --name-only --diff-filter ACM | grep "\.go" | grep -v "third_party"); do
|
||||
for file in $(git diff --cached --name-only --diff-filter ACM | grep "\.go" | grep -v -e "third_party" -e "Godeps"); do
|
||||
# Check for files that fail gofmt.
|
||||
diff="$(git show ":${file}" | gofmt -s -d)"
|
||||
if [[ -n "$diff" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user