Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Add spellcheck tests #228

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
239 changes: 214 additions & 25 deletions Gopkg.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

# Code generation dependencies
required = [
"github.com/client9/misspell/cmd/misspell",
"k8s.io/code-generator/cmd/client-gen",
"k8s.io/code-generator/cmd/conversion-gen",
"k8s.io/code-generator/cmd/deepcopy-gen",
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ all: build
test: build-dirs Makefile
@echo "Testing: $(SRC_DIRS)"
PKG=$(PKG) ./hack/test.sh $(SRC_DIRS)
@echo "Running Spellchecker"
./hack/spellcheck.sh

.PHONY: build-dirs
build-dirs:
Expand Down
4 changes: 2 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ make push
The resulting tag for the container image will be named as the agent version
in the format of `$USER-TIMESTAMP`. This will need to be remembered as this is
needed for a latter step or can be exported as the `$MYSQL_AGENT_VERSION`
envrionment variable.
environment variable.

```bash
$ export MYSQL_AGENT_VERSION=$(cat dist/version.txt)
Expand All @@ -42,7 +42,7 @@ ServiceAccounts, ClusterRoles, and ClusterRoleBindings for the operator to
function.

```bash
$ kubectl -n $USER apply -f contrib/manifests/custom-resource-definitions.yaml
$ kubectl -n $USER apply -f contrib/manifests/custom-resource-definitions.yaml
```
```bash
$ sed -e "s/<NAMESPACE>/${USER}/g" contrib/manifests/rbac.yaml | kubectl -n $USER apply -f -
Expand Down
2 changes: 1 addition & 1 deletion docs/user/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Some aspects of the MySQL Operator can be configured via:
When applicable, a commandline parameter will override the equivalent config
map parameter.

Most of the time it should not be neccessary to supply any specific
Most of the time it should not be necessary to supply any specific
configuration and the operator will use sensible defaults when required
values are not specified.

Expand Down
14 changes: 14 additions & 0 deletions hack/spellcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
#
# Performs a spellcheck on golang and markdown files, excluding the vendor directory

set -e

REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_BIN_DIR="${REPO_ROOT}/bin"

cd "${REPO_ROOT}"
GOBIN="${REPO_BIN_DIR}" go install ./vendor/github.com/client9/misspell/cmd/misspell

find . -type f \( -name "*.go" -o -name "*.md" \) -a \( -not -path "./vendor/*" \) | \
xargs ${REPO_BIN_DIR}/misspell -error
34 changes: 34 additions & 0 deletions vendor/github.com/client9/misspell/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions vendor/github.com/client9/misspell/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions vendor/github.com/client9/misspell/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions vendor/github.com/client9/misspell/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions vendor/github.com/client9/misspell/Gopkg.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/client9/misspell/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions vendor/github.com/client9/misspell/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading