Fix scripts to avoid testdata

This commit is contained in:
Tim Hockin 2024-01-06 23:35:52 -08:00
parent 514dd0e1f6
commit db590ecd89
No known key found for this signature in database
5 changed files with 6 additions and 2 deletions

View File

@ -152,6 +152,7 @@ skipped_names = [
".git",
"cluster/env.sh",
"vendor",
"testdata",
"test/e2e/generated/bindata.go",
"hack/boilerplate/test",
"staging/src/k8s.io/kubectl/pkg/generated/bindata.go",

View File

@ -36,6 +36,7 @@ function git_find() {
':!:*/vendor/*' `# catches any subdir/vendor/...` \
':!:third_party/*' `# catches third_party/...` \
':!:*/third_party/*' `# catches third_party/...` \
':!:*/testdata/*' `# catches any subdir/testdata/...` \
':(glob)**/*.go' \
"$@"
}

View File

@ -53,7 +53,8 @@ function git_find() {
':!:vendor/*' `# catches vendor/...` \
':!:*/vendor/*' `# catches any subdir/vendor/...` \
':!:third_party/*' `# catches third_party/...` \
':!:*/third_party/*' `# catches third_party/...` \
':!:*/third_party/*' `# catches any subdir/third_party/...` \
':!:*/testdata/*' `# catches any subdir/testdata/...` \
':(glob)**/*.go' \
"$@"
}

View File

@ -43,7 +43,7 @@ find_files() {
-o -wholename './target' \
-o -wholename '*/third_party/*' \
-o -wholename '*/vendor/*' \
-o -wholename './staging/src/k8s.io/client-go/*vendor/*' \
-o -wholename '*/testdata/*' \
-o -wholename '*/bindata.go' \
\) -prune \
\) -name '*.go'

View File

@ -36,6 +36,7 @@ function find_files_to_check() {
git ls-files -cmo --exclude-standard \
':!:vendor/*' `# catches vendor/...` \
':!:*/vendor/*' `# catches any subdir/vendor/...` \
':!:*/testdata/*' `# catches any subdir/testdata/...` \
':!:third_party/*' `# catches third_party/...` \
':!:*/third_party/*' `# catches third_party/...` \
':!:hack/*' `# catches hack/...` \