Browse Source

Merge pull request #39655 from thaJeztah/fix_indentation

hack: fix mixed tabs/spaces for indentation
Akihiro Suda 6 years ago
parent
commit
a6aa11a3ef

+ 21 - 21
hack/generate-swagger-api.sh

@@ -2,26 +2,26 @@
 set -eu
 set -eu
 
 
 swagger generate model -f api/swagger.yaml \
 swagger generate model -f api/swagger.yaml \
-    -t api -m types --skip-validator -C api/swagger-gen.yaml \
-    -n ErrorResponse \
-    -n GraphDriverData \
-    -n IdResponse \
-    -n ImageDeleteResponseItem \
-    -n ImageSummary \
-    -n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
-    -n Port \
-    -n ServiceUpdateResponse \
-    -n Volume
+	-t api -m types --skip-validator -C api/swagger-gen.yaml \
+	-n ErrorResponse \
+	-n GraphDriverData \
+	-n IdResponse \
+	-n ImageDeleteResponseItem \
+	-n ImageSummary \
+	-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
+	-n Port \
+	-n ServiceUpdateResponse \
+	-n Volume
 
 
 swagger generate operation -f api/swagger.yaml \
 swagger generate operation -f api/swagger.yaml \
-    -t api -a types -m types -C api/swagger-gen.yaml \
-    -T api/templates --skip-responses --skip-parameters --skip-validator \
-    -n Authenticate \
-    -n ContainerChanges \
-    -n ContainerCreate \
-    -n ContainerTop \
-    -n ContainerUpdate \
-    -n ContainerWait \
-    -n ImageHistory \
-    -n VolumeCreate \
-    -n VolumeList
+	-t api -a types -m types -C api/swagger-gen.yaml \
+	-T api/templates --skip-responses --skip-parameters --skip-validator \
+	-n Authenticate \
+	-n ContainerChanges \
+	-n ContainerCreate \
+	-n ContainerTop \
+	-n ContainerUpdate \
+	-n ContainerWait \
+	-n ImageHistory \
+	-n VolumeCreate \
+	-n VolumeList

+ 1 - 1
hack/make/.integration-daemon-start

@@ -20,7 +20,7 @@ fi
 # This is a temporary hack for split-binary mode. It can be removed once
 # This is a temporary hack for split-binary mode. It can be removed once
 # https://github.com/docker/docker/pull/22134 is merged into docker master
 # https://github.com/docker/docker/pull/22134 is merged into docker master
 if [ "$(go env GOOS)" = 'windows' ]; then
 if [ "$(go env GOOS)" = 'windows' ]; then
-       return
+	return
 fi
 fi
 
 
 if [ -z "$DOCKER_TEST_HOST" ]; then
 if [ -z "$DOCKER_TEST_HOST" ]; then

+ 3 - 4
hack/make/dynbinary

@@ -3,8 +3,7 @@ set -e
 
 
 # This script exists as backwards compatibility for CI
 # This script exists as backwards compatibility for CI
 (
 (
-
-    DEST="${DEST}-daemon"
-    ABS_DEST="${ABS_DEST}-daemon"
-    . hack/make/dynbinary-daemon
+	DEST="${DEST}-daemon"
+	ABS_DEST="${ABS_DEST}-daemon"
+	. hack/make/dynbinary-daemon
 )
 )

+ 12 - 12
hack/make/test-integration-flaky

@@ -3,13 +3,13 @@ set -e -o pipefail
 
 
 source hack/validate/.validate
 source hack/validate/.validate
 new_tests=$(
 new_tests=$(
-    validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
-    grep -E '^(\+func )(.*)(\*testing)' || true
+	validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
+	grep -E '^(\+func )(.*)(\*testing)' || true
 )
 )
 
 
 if [ -z "$new_tests" ]; then
 if [ -z "$new_tests" ]; then
-    echo 'No new tests added to integration.'
-    return
+	echo 'No new tests added to integration.'
+	return
 fi
 fi
 
 
 echo
 echo
@@ -18,12 +18,12 @@ echo "$new_tests"
 echo "Running stress test for them."
 echo "Running stress test for them."
 
 
 (
 (
-    TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
-    # Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
-    # and each test will run 5 times in a row under the same daemon.
-    # This will make a total of 25 runs for each test in TESTARRAY.
-    export TEST_REPEAT=5
-    export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
-    echo "Using test flags: $TESTFLAGS"
-    source hack/make/test-integration
+	TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
+	# Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
+	# and each test will run 5 times in a row under the same daemon.
+	# This will make a total of 25 runs for each test in TESTARRAY.
+	export TEST_REPEAT=5
+	export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
+	echo "Using test flags: $TESTFLAGS"
+	source hack/make/test-integration
 )
 )

+ 6 - 6
hack/test/unit

@@ -20,9 +20,9 @@ pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
 
 
 mkdir -p bundles
 mkdir -p bundles
 gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
 gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
-  "${BUILDFLAGS[@]}" \
-  -cover \
-  -coverprofile=bundles/profile.out \
-  -covermode=atomic \
-  ${TESTFLAGS} \
-  ${pkg_list}
+	"${BUILDFLAGS[@]}" \
+	-cover \
+	-coverprofile=bundles/profile.out \
+	-covermode=atomic \
+	${TESTFLAGS} \
+	${pkg_list}

+ 2 - 2
hack/validate/changelog-date-descending

@@ -3,8 +3,8 @@
 changelogFile=${1:-CHANGELOG.md}
 changelogFile=${1:-CHANGELOG.md}
 
 
 if [ ! -r "$changelogFile" ]; then
 if [ ! -r "$changelogFile" ]; then
-  echo "Unable to read file $changelogFile" >&2
-  exit 1
+	echo "Unable to read file $changelogFile" >&2
+	exit 1
 fi
 fi
 
 
 grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
 grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2

+ 8 - 8
hack/validate/changelog-well-formed

@@ -3,8 +3,8 @@
 changelogFile=${1:-CHANGELOG.md}
 changelogFile=${1:-CHANGELOG.md}
 
 
 if [ ! -r "$changelogFile" ]; then
 if [ ! -r "$changelogFile" ]; then
-  echo "Unable to read file $changelogFile" >&2
-  exit 1
+	echo "Unable to read file $changelogFile" >&2
+	exit 1
 fi
 fi
 
 
 changelogWellFormed=1
 changelogWellFormed=1
@@ -12,14 +12,14 @@ changelogWellFormed=1
 # e.g. "## 1.12.3 (2016-10-26)"
 # e.g. "## 1.12.3 (2016-10-26)"
 VER_LINE_REGEX='^## [0-9]+\.[0-9]+\.[0-9]+(-ce)? \([0-9]+-[0-9]+-[0-9]+\)$'
 VER_LINE_REGEX='^## [0-9]+\.[0-9]+\.[0-9]+(-ce)? \([0-9]+-[0-9]+-[0-9]+\)$'
 while read -r line; do
 while read -r line; do
-  if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
-    echo "Malformed changelog $changelogFile line \"$line\"" >&2
-    changelogWellFormed=0
-  fi
+	if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
+		echo "Malformed changelog $changelogFile line \"$line\"" >&2
+		changelogWellFormed=0
+	fi
 done < <(grep '^## ' $changelogFile)
 done < <(grep '^## ' $changelogFile)
 
 
 if [[ "$changelogWellFormed" == "1" ]]; then
 if [[ "$changelogWellFormed" == "1" ]]; then
-  echo "Congratulations!  Changelog $changelogFile is well-formed."
+	echo "Congratulations!  Changelog $changelogFile is well-formed."
 else
 else
-  exit 2
+	exit 2
 fi
 fi

+ 3 - 3
hack/validate/deprecate-integration-cli

@@ -5,13 +5,13 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 source "${SCRIPTDIR}/.validate"
 source "${SCRIPTDIR}/.validate"
 
 
 new_tests=$(
 new_tests=$(
-    validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
-    grep -E '^\+func (.*) Test' || true
+	validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
+	grep -E '^\+func (.*) Test' || true
 )
 )
 
 
 if [ -z "$new_tests" ]; then
 if [ -z "$new_tests" ]; then
 	echo 'Congratulations!  No new tests added to integration-cli.'
 	echo 'Congratulations!  No new tests added to integration-cli.'
-    exit
+	exit
 fi
 fi
 
 
 echo "The following new tests were added to integration-cli:"
 echo "The following new tests were added to integration-cli:"

+ 2 - 2
hack/validate/swagger

@@ -8,6 +8,6 @@ files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' ||
 unset IFS
 unset IFS
 
 
 if [ ${#files[@]} -gt 0 ]; then
 if [ ${#files[@]} -gt 0 ]; then
-  yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
-  swagger validate api/swagger.yaml
+	yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
+	swagger validate api/swagger.yaml
 fi
 fi

+ 1 - 1
hack/validate/swagger-gen

@@ -25,5 +25,5 @@ if [ ${#files[@]} -gt 0 ]; then
 		echo 'Congratulations! All api changes are done the right way.'
 		echo 'Congratulations! All api changes are done the right way.'
 	fi
 	fi
 else
 else
-    echo 'No api/types/ or api/swagger.yaml changes in diff.'
+	echo 'No api/types/ or api/swagger.yaml changes in diff.'
 fi
 fi