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
beca6c7c
Commit
beca6c7c
authored
Apr 12, 2019
by
s-ito-ts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shellcheck failures in /hack/verify-[a-g]*.sh.
parent
9f1b04f9
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 @
beca6c7c
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
./hack/pin-dependency.sh
./hack/pin-dependency.sh
./hack/test-integration.sh
./hack/test-integration.sh
./hack/update-vendor.sh
./hack/update-vendor.sh
./hack/verify-golint.sh
./hack/verify-test-featuregates.sh
./hack/verify-test-featuregates.sh
./test/cmd/apply.sh
./test/cmd/apply.sh
./test/cmd/apps.sh
./test/cmd/apps.sh
...
...
hack/verify-golint.sh
View file @
beca6c7c
...
@@ -18,7 +18,7 @@ set -o errexit
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
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/init.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
...
@@ -44,12 +44,10 @@ export IFS=$'\n'
...
@@ -44,12 +44,10 @@ export IFS=$'\n'
# NOTE: when "go list -e ./..." is run within GOPATH, it turns the k8s.io/kubernetes
# 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
# 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.
# with a leading underscore. We'll need to support both scenarios for all_packages.
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
\}
||"
)
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
=()
failing_packages
=(
while
IFS
=
''
read
-r
line
;
do
failing_packages+
=(
"
$line
"
)
;
done
< <
(
cat
"
$failure_file
"
)
$(
cat
$failure_file
)
)
unset
IFS
unset
IFS
errors
=()
errors
=()
not_failing
=()
not_failing
=()
...
@@ -63,13 +61,13 @@ for p in "${all_packages[@]}"; do
...
@@ -63,13 +61,13 @@ for p in "${all_packages[@]}"; do
# completely.
# completely.
# Ref: https://github.com/kubernetes/kubernetes/pull/67675
# Ref: https://github.com/kubernetes/kubernetes/pull/67675
# Ref: https://github.com/golang/lint/issues/68
# 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
=
$?
kube::util::array_contains
"
$p
"
"
${
failing_packages
[@]
}
"
&&
in_failing
=
$?
||
in_failing
=
$?
if
[[
-n
"
${
failedLint
}
"
]]
&&
[[
"
${
in_failing
}
"
-ne
"0"
]]
;
then
if
[[
-n
"
${
failedLint
}
"
]]
&&
[[
"
${
in_failing
}
"
-ne
"0"
]]
;
then
errors+
=(
"
${
failedLint
}
"
)
errors+
=(
"
${
failedLint
}
"
)
fi
fi
if
[[
-z
"
${
failedLint
}
"
]]
&&
[[
"
${
in_failing
}
"
-eq
"0"
]]
;
then
if
[[
-z
"
${
failedLint
}
"
]]
&&
[[
"
${
in_failing
}
"
-eq
"0"
]]
;
then
not_failing+
=(
$p
)
not_failing+
=(
"
$p
"
)
fi
fi
done
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