-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add spell check #6716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spell check #6716
Conversation
7e0e3af to
e366dcd
Compare
|
Do we really need to check in a dictionary for this? |
|
needs a |
e366dcd to
d76f99f
Compare
|
It looks like you didn't use You'll need to add the binary to the Lines 3 to 6 in 4c30b2d
as otherwise dep ensure will remove it later.
To prevent
|
d76f99f to
ee4c0d9
Compare
|
@ixdy we should tweak this comment a bit and add it to |
BenTheElder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/hold
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, dixudx The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these OWNERS Files:
Approvers can indicate their approval by writing |
|
It looks like |
|
We need a hack/verify-sh-is-executable.sh LGTM from me |
|
I'm pretty sure we don't want to merge this yet, since there seem to be a number of spelling errors that need to be fixed. I also wonder if we want to turn this into a proper bazel test, rather than a separate verify job. It's actually a pretty simple change, roughly something like diff --git a/hack/BUILD b/hack/BUILD
index 5795a230e..8ec4e58e3 100644
--- a/hack/BUILD
+++ b/hack/BUILD
@@ -24,6 +24,16 @@ sh_test(
],
)
+sh_test(
+ name = "verify-spelling",
+ srcs = ["verify-spelling.sh"],
+ args = ["$(location //vendor/github.com/client9/misspell/cmd/misspell)"],
+ data = [
+ "//:all-srcs",
+ "//vendor/github.com/client9/misspell/cmd/misspell",
+ ],
+)
+
test_suite(
name = "verify-all",
tests = [
diff --git a/hack/verify-spelling.sh b/hack/verify-spelling.sh
old mode 100644
new mode 100755
index 9957a9a95..cfc3e7923
--- a/hack/verify-spelling.sh
+++ b/hack/verify-spelling.sh
@@ -16,14 +16,12 @@
set -o errexit
set -o nounset
set -o pipefail
-set -o xtrace
-go install ./vendor/github.com/client9/misspell/cmd/misspell
-if ! which misspell >/dev/null 2>&1; then
- echo "Can't find misspell - is your GOPATH 'bin' in your PATH?"
- echo " GOPATH: ${GOPATH}"
- echo " PATH: ${PATH}"
- exit 1
-fi
-
-git ls-files | grep -v -e vendor -e static -e third_party | xargs misspell -error
+misspell=$1
+find -L . -type f -not \( \
+ \( \
+ -path '*/vendor/*' \
+ -o -path '*/static/*' \
+ -o -path '*/third_party/*' \
+ \) -prune \
+\) | xargs "${misspell}" -errorIt might be nice to pass the location of the misspell binary as a flag, rather than just a bare argument, but I didn't want to go try to figure out |
|
oh, my comment about there currently being spelling errors was wrong; this PR needed rebasing. $ bazel test hack/verify-spelling
INFO: Analysed target //hack:verify-spelling (14 packages loaded).
INFO: Found 1 test target...
Target //hack:verify-spelling up-to-date:
bazel-bin/hack/verify-spelling
INFO: Elapsed time: 7.951s, Critical Path: 5.33s
INFO: Build completed successfully, 4 total actions
//hack:verify-spelling PASSED in 5.2s(just sayin') |
|
Making this a bazel test certainly sounds nice to me. Way easier to run with confidence. |
|
(otoh I see no reason why that can't be done in the next PR?) |
|
Poor dixudx has already had to deal with godep in k/k and dep in k/t-i :-) seems like sufficient suffering for one PR, and I'm excited to start complaining about how my poor spelling keeps me from merging anything 😁 |
|
that's true. this is passing all tests, so lgtm. |
|
another PR is fine. |
|
So it is ready to go? And remove the |
|
#6717 has already fixed the typos. It's okay to merge this PR. |
|
/hold cancel |
|
@dixudx: Updated the config configmap DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
bazelification in #6760. |
|
also, the permissions of |
Yeah, I found that as well. I've added some new words in client9/misspell#133. |
|
ah, I didn't realize it was a list of corrections, not of known words. is there an option to add additional corrections on the cmdline? we probably want to correct |
No. So sad. |
/assign @BenTheElder
Add spelling check to avoid typos when a PR gets merged.