Skip to content

Commit

Permalink
Make the spelling and boilerplate checks optional
Browse files Browse the repository at this point in the history
The boilerplate and spelling tests are made optional and the default
paths in the relative scripts are made absolute.
  • Loading branch information
sachinkumarsingh092 committed Jan 15, 2021
1 parent 5f06d02 commit ad29307
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions build.make
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,13 @@ check-go-version-%:

# Test for spelling errors.
.PHONY: test-spelling
test: test-spelling
test-spelling:
@ echo; echo "### $@:"
@ ./release-tools/verify-spelling.sh
@ ./release-tools/verify-spelling.sh "$(pwd)"

# Test the boilerplates of the files.
.PHONY: test-boilerplate
test: test-boilerplate
test-boilerplate:
@ echo; echo "### $@:"
@ ./release-tools/verify-boilerplate.sh
@ ./release-tools/verify-boilerplate.sh "$(pwd)"

4 changes: 2 additions & 2 deletions verify-boilerplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ if [[ -z "$(command -v python)" ]]; then
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
fi

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

# Directory to check. Default is the parent of the tools themselves.
ROOT="${1:-${TOOLS}/..}"
Expand Down
4 changes: 2 additions & 2 deletions verify-spelling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ set -o pipefail

TOOL_VERSION="v0.3.4"

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

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

0 comments on commit ad29307

Please sign in to comment.