From 3480d2dbf0eeb83ec62df0c03cbdb438f4d5b3c2 Mon Sep 17 00:00:00 2001 From: Allen Sun Date: Fri, 11 May 2018 01:37:38 +0800 Subject: [PATCH] feature: add misspell tool to check English words Signed-off-by: Allen Sun --- .circleci/config.yml | 22 ++++++---------------- pkg/errtypes/errors.go | 2 +- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fda561a9d..77645a34a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,29 +3,19 @@ # Check https://circleci.com/docs/2.0/language-go/ for more details version: 2 jobs: - markdown-lint-docs: + misspell-and-markdown-lint: docker: - # specify the version - - image: allencloud/mdl:v0.4 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 - - #### TEMPLATE_NOTE: go expects specific checkout path representing url - #### expecting it in the form of - #### /go/src/github.com/circleci/go-tool - #### /go/src/bitbucket.org/circleci/go-tool + - image: allencloud/mdlmisspell:v0.1 working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}} steps: - checkout - - # specify any bash command here prefixed with `run: ` - run: name: use markdownlint v0.4.0 to lint markdown file (https://github.com/markdownlint/markdownlint) command: | find ./ -name "*.md" | grep -v vendor | grep -v extra | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036 + - run: + name: use opensource tool client9/misspell to correct commonly misspelled English words + command: find ./* -name "*" | grep -v extra | grep -v vendor | xargs misspell -error code-check: docker: @@ -62,6 +52,6 @@ workflows: version: 2 ci: jobs: - - markdown-lint-docs + - misspell-and-markdown-lint - code-check - unit-test diff --git a/pkg/errtypes/errors.go b/pkg/errtypes/errors.go index acf4943b2..78db2f54c 100644 --- a/pkg/errtypes/errors.go +++ b/pkg/errtypes/errors.go @@ -29,7 +29,7 @@ var ( // ErrNotImplemented represents that the function is not implemented. ErrNotImplemented = errorType{codeNotImplemented, "not implemented"} - // ErrUsingbyContainers represents that object is useing by containers + // ErrUsingbyContainers represents that object is used by containers ErrUsingbyContainers = errorType{codeInUse, "using by containers"} )