Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 0873c3b

Browse files
committed
hack: fix mixed tabs/spaces for indentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 2cffe9b) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 83e7de5 commit 0873c3b

10 files changed

Lines changed: 59 additions & 60 deletions

hack/generate-swagger-api.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
set -eu
33

44
swagger generate model -f api/swagger.yaml \
5-
-t api -m types --skip-validator -C api/swagger-gen.yaml \
6-
-n ErrorResponse \
7-
-n GraphDriverData \
8-
-n IdResponse \
9-
-n ImageDeleteResponseItem \
10-
-n ImageSummary \
11-
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
12-
-n Port \
13-
-n ServiceUpdateResponse \
14-
-n Volume
5+
-t api -m types --skip-validator -C api/swagger-gen.yaml \
6+
-n ErrorResponse \
7+
-n GraphDriverData \
8+
-n IdResponse \
9+
-n ImageDeleteResponseItem \
10+
-n ImageSummary \
11+
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
12+
-n Port \
13+
-n ServiceUpdateResponse \
14+
-n Volume
1515

1616
swagger generate operation -f api/swagger.yaml \
17-
-t api -a types -m types -C api/swagger-gen.yaml \
18-
-T api/templates --skip-responses --skip-parameters --skip-validator \
19-
-n Authenticate \
20-
-n ContainerChanges \
21-
-n ContainerCreate \
22-
-n ContainerTop \
23-
-n ContainerUpdate \
24-
-n ContainerWait \
25-
-n ImageHistory \
26-
-n VolumeCreate \
27-
-n VolumeList
17+
-t api -a types -m types -C api/swagger-gen.yaml \
18+
-T api/templates --skip-responses --skip-parameters --skip-validator \
19+
-n Authenticate \
20+
-n ContainerChanges \
21+
-n ContainerCreate \
22+
-n ContainerTop \
23+
-n ContainerUpdate \
24+
-n ContainerWait \
25+
-n ImageHistory \
26+
-n VolumeCreate \
27+
-n VolumeList

hack/make/.integration-daemon-start

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fi
2020
# This is a temporary hack for split-binary mode. It can be removed once
2121
# https://github.com/docker/docker/pull/22134 is merged into docker master
2222
if [ "$(go env GOOS)" = 'windows' ]; then
23-
return
23+
return
2424
fi
2525

2626
if [ -z "$DOCKER_TEST_HOST" ]; then

hack/make/dynbinary

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ set -e
33

44
# This script exists as backwards compatibility for CI
55
(
6-
7-
DEST="${DEST}-daemon"
8-
ABS_DEST="${ABS_DEST}-daemon"
9-
. hack/make/dynbinary-daemon
6+
DEST="${DEST}-daemon"
7+
ABS_DEST="${ABS_DEST}-daemon"
8+
. hack/make/dynbinary-daemon
109
)

hack/make/test-integration-flaky

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ set -e -o pipefail
33

44
source hack/validate/.validate
55
new_tests=$(
6-
validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
7-
grep -E '^(\+func )(.*)(\*testing)' || true
6+
validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
7+
grep -E '^(\+func )(.*)(\*testing)' || true
88
)
99

1010
if [ -z "$new_tests" ]; then
11-
echo 'No new tests added to integration.'
12-
return
11+
echo 'No new tests added to integration.'
12+
return
1313
fi
1414

1515
echo
@@ -18,12 +18,12 @@ echo "$new_tests"
1818
echo "Running stress test for them."
1919

2020
(
21-
TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
22-
# Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
23-
# and each test will run 5 times in a row under the same daemon.
24-
# This will make a total of 25 runs for each test in TESTARRAY.
25-
export TEST_REPEAT=5
26-
export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
27-
echo "Using test flags: $TESTFLAGS"
28-
source hack/make/test-integration
21+
TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
22+
# Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
23+
# and each test will run 5 times in a row under the same daemon.
24+
# This will make a total of 25 runs for each test in TESTARRAY.
25+
export TEST_REPEAT=5
26+
export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
27+
echo "Using test flags: $TESTFLAGS"
28+
source hack/make/test-integration
2929
)

hack/test/unit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
2020

2121
mkdir -p bundles
2222
gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
23-
"${BUILDFLAGS[@]}" \
24-
-cover \
25-
-coverprofile=bundles/profile.out \
26-
-covermode=atomic \
27-
${TESTFLAGS} \
28-
${pkg_list}
23+
"${BUILDFLAGS[@]}" \
24+
-cover \
25+
-coverprofile=bundles/profile.out \
26+
-covermode=atomic \
27+
${TESTFLAGS} \
28+
${pkg_list}

hack/validate/changelog-date-descending

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
changelogFile=${1:-CHANGELOG.md}
44

55
if [ ! -r "$changelogFile" ]; then
6-
echo "Unable to read file $changelogFile" >&2
7-
exit 1
6+
echo "Unable to read file $changelogFile" >&2
7+
exit 1
88
fi
99

1010
grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2

hack/validate/changelog-well-formed

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
changelogFile=${1:-CHANGELOG.md}
44

55
if [ ! -r "$changelogFile" ]; then
6-
echo "Unable to read file $changelogFile" >&2
7-
exit 1
6+
echo "Unable to read file $changelogFile" >&2
7+
exit 1
88
fi
99

1010
changelogWellFormed=1
1111

1212
# e.g. "## 1.12.3 (2016-10-26)"
1313
VER_LINE_REGEX='^## [0-9]+\.[0-9]+\.[0-9]+(-ce)? \([0-9]+-[0-9]+-[0-9]+\)$'
1414
while read -r line; do
15-
if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
16-
echo "Malformed changelog $changelogFile line \"$line\"" >&2
17-
changelogWellFormed=0
18-
fi
15+
if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
16+
echo "Malformed changelog $changelogFile line \"$line\"" >&2
17+
changelogWellFormed=0
18+
fi
1919
done < <(grep '^## ' $changelogFile)
2020

2121
if [[ "$changelogWellFormed" == "1" ]]; then
22-
echo "Congratulations! Changelog $changelogFile is well-formed."
22+
echo "Congratulations! Changelog $changelogFile is well-formed."
2323
else
24-
exit 2
24+
exit 2
2525
fi

hack/validate/deprecate-integration-cli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
source "${SCRIPTDIR}/.validate"
66

77
new_tests=$(
8-
validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
9-
grep -E '^\+func (.*) Test' || true
8+
validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
9+
grep -E '^\+func (.*) Test' || true
1010
)
1111

1212
if [ -z "$new_tests" ]; then
1313
echo 'Congratulations! No new tests added to integration-cli.'
14-
exit
14+
exit
1515
fi
1616

1717
echo "The following new tests were added to integration-cli:"

hack/validate/swagger

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' ||
88
unset IFS
99

1010
if [ ${#files[@]} -gt 0 ]; then
11-
yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
12-
swagger validate api/swagger.yaml
11+
yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
12+
swagger validate api/swagger.yaml
1313
fi

hack/validate/swagger-gen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ if [ ${#files[@]} -gt 0 ]; then
2525
echo 'Congratulations! All api changes are done the right way.'
2626
fi
2727
else
28-
echo 'No api/types/ or api/swagger.yaml changes in diff.'
28+
echo 'No api/types/ or api/swagger.yaml changes in diff.'
2929
fi

0 commit comments

Comments
 (0)