mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
hack/validate/vendor: shellcheck fixes
The export statement is definitely not needed. The rest is obvious. > In hack/validate/vendor line 3: > export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" > ^-- SC2155: Declare and assign separately to avoid masking return values. > > > In hack/validate/vendor line 43: > if ls -d vendor/$f > /dev/null 2>&1; then > ^-- SC2086: Double quote to prevent globbing and word splitting. > > > In hack/validate/vendor line 44: > found=$(find vendor/$f -iregex '.*LICENSE.*' -or -iregex '.*COPYRIGHT.*' -or -iregex '.*COPYING.*' | wc -l) > ^-- SC2086: Double quote to prevent globbing and word splitting. > > > In hack/validate/vendor line 45: > if [ $found -eq 0 ]; then > ^-- SC2086: Double quote to prevent globbing and word splitting. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
9d4e81e8bf
commit
4be12ad3d0
1 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source "${SCRIPTDIR}/.validate"
|
source "${SCRIPTDIR}/.validate"
|
||||||
|
|
||||||
validate_vendor_diff(){
|
validate_vendor_diff(){
|
||||||
|
@ -40,9 +40,9 @@ validate_vendor_diff(){
|
||||||
validate_vendor_used() {
|
validate_vendor_used() {
|
||||||
pkgs=$(mawk '/^[a-zA-Z0-9]/ { print $1 }' < vendor.conf)
|
pkgs=$(mawk '/^[a-zA-Z0-9]/ { print $1 }' < vendor.conf)
|
||||||
for f in $pkgs; do
|
for f in $pkgs; do
|
||||||
if ls -d vendor/$f > /dev/null 2>&1; then
|
if ls -d "vendor/$f" > /dev/null 2>&1; then
|
||||||
found=$(find vendor/$f -iregex '.*LICENSE.*' -or -iregex '.*COPYRIGHT.*' -or -iregex '.*COPYING.*' | wc -l)
|
found=$(find "vendor/$f" -iregex '.*LICENSE.*' -or -iregex '.*COPYRIGHT.*' -or -iregex '.*COPYING.*' | wc -l)
|
||||||
if [ $found -eq 0 ]; then
|
if [ "$found" -eq 0 ]; then
|
||||||
echo "WARNING: could not find copyright information for $f"
|
echo "WARNING: could not find copyright information for $f"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue