Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6ced4fe2
Unverified
Commit
6ced4fe2
authored
May 08, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76475 from s-ito-ts/shellcheck_hack_verify
fix shellcheck failures in /hack/verify-[a-g]*.sh.
parents
ee0038ad
beca6c7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
.shellcheck_failures
hack/.shellcheck_failures
+0
-1
verify-golint.sh
hack/verify-golint.sh
+7
-9
No files found.
hack/.shellcheck_failures
View file @
6ced4fe2
...
...
@@ -29,7 +29,6 @@
./hack/pin-dependency.sh
./hack/test-integration.sh
./hack/update-vendor.sh
./hack/verify-golint.sh
./hack/verify-test-featuregates.sh
./test/cmd/apply.sh
./test/cmd/apps.sh
...
...
hack/verify-golint.sh
View file @
6ced4fe2
...
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
...
...
@@ -44,12 +44,10 @@ export IFS=$'\n'
# NOTE: when "go list -e ./..." is run within GOPATH, it turns the k8s.io/kubernetes
# as the prefix, however if we run it outside it returns the full path of the file
# with a leading underscore. We'll need to support both scenarios for all_packages.
all_packages
=(
$(
go list
-e
./... | egrep
-v
"/(third_party|vendor|staging/src/k8s.io/client-go/pkg|generated|clientset_generated)"
|
sed
-e
's|^k8s.io/kubernetes/||'
-e
"s|^_
\(
${
KUBE_ROOT
}
/
\)\{
0,1
\}
||"
)
)
failing_packages
=(
$(
cat
$failure_file
)
)
all_packages
=()
while
IFS
=
''
read
-r
line
;
do
all_packages+
=(
"
$line
"
)
;
done
< <
(
go list
-e
./... |
grep
-vE
"/(third_party|vendor|staging/src/k8s.io/client-go/pkg|generated|clientset_generated)"
|
sed
-e
's|^k8s.io/kubernetes/||'
-e
"s|^_
\(
${
KUBE_ROOT
}
/
\)\{
0,1
\}
||"
)
failing_packages
=()
while
IFS
=
''
read
-r
line
;
do
failing_packages+
=(
"
$line
"
)
;
done
< <
(
cat
"
$failure_file
"
)
unset
IFS
errors
=()
not_failing
=()
...
...
@@ -63,13 +61,13 @@ for p in "${all_packages[@]}"; do
# completely.
# Ref: https://github.com/kubernetes/kubernetes/pull/67675
# Ref: https://github.com/golang/lint/issues/68
failedLint
=
$(
ls
"
$p
"
/
*
.go | egrep
-v
"(zz_generated.*.go|generated.pb.go|generated.proto|types_swagger_doc_generated.go)"
| xargs
-L1
golint 2>/dev/null
)
failedLint
=
$(
find
"
$p
"
/
*
.go |
grep
-vE
"(zz_generated.*.go|generated.pb.go|generated.proto|types_swagger_doc_generated.go)"
| xargs
-L1
golint 2>/dev/null
)
kube::util::array_contains
"
$p
"
"
${
failing_packages
[@]
}
"
&&
in_failing
=
$?
||
in_failing
=
$?
if
[[
-n
"
${
failedLint
}
"
]]
&&
[[
"
${
in_failing
}
"
-ne
"0"
]]
;
then
errors+
=(
"
${
failedLint
}
"
)
fi
if
[[
-z
"
${
failedLint
}
"
]]
&&
[[
"
${
in_failing
}
"
-eq
"0"
]]
;
then
not_failing+
=(
$p
)
not_failing+
=(
"
$p
"
)
fi
done
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment