Skip to content

Commit ad29307

Browse files
Make the spelling and boilerplate checks optional
The boilerplate and spelling tests are made optional and the default paths in the relative scripts are made absolute.
1 parent 5f06d02 commit ad29307

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

Diff for: build.make

+2-4
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,13 @@ check-go-version-%:
278278

279279
# Test for spelling errors.
280280
.PHONY: test-spelling
281-
test: test-spelling
282281
test-spelling:
283282
@ echo; echo "### $@:"
284-
@ ./release-tools/verify-spelling.sh
283+
@ ./release-tools/verify-spelling.sh "$(pwd)"
285284

286285
# Test the boilerplates of the files.
287286
.PHONY: test-boilerplate
288-
test: test-boilerplate
289287
test-boilerplate:
290288
@ echo; echo "### $@:"
291-
@ ./release-tools/verify-boilerplate.sh
289+
@ ./release-tools/verify-boilerplate.sh "$(pwd)"
292290

Diff for: verify-boilerplate.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ if [[ -z "$(command -v python)" ]]; then
2525
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
2626
fi
2727

28-
# The csi-release-tools directory.
29-
TOOLS="$(dirname "${BASH_SOURCE[0]}")"
28+
# The csi-release-tools directory (absolute path).
29+
TOOLS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
3030

3131
# Directory to check. Default is the parent of the tools themselves.
3232
ROOT="${1:-${TOOLS}/..}"

Diff for: verify-spelling.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ set -o pipefail
2020

2121
TOOL_VERSION="v0.3.4"
2222

23-
# The csi-release-tools directory.
24-
TOOLS="$(dirname "${BASH_SOURCE[0]}")"
23+
# The csi-release-tools directory (absolute path).
24+
TOOLS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
2525

2626
# Directory to check. Default is the parent of the tools themselves.
2727
ROOT="${1:-${TOOLS}/..}"

0 commit comments

Comments
 (0)