Skip to content

Conversation

@allencloud
Copy link
Collaborator

@allencloud allencloud commented May 10, 2018

Signed-off-by: Allen Sun [email protected]

Ⅰ. Describe what this PR did

I add tool misspell to check incorrect English words spelling in this project.

I combined this feature in CI with test type of markdownlint.

In addition I use a new Dockerfile to construct new image allencloud/mdlmisspell:v0.1:

FROM ubuntu:16.04

RUN apt-get update \
    && apt-get install -y rubygems git curl \
    && gem install rake \
    && gem install bundler \
    && apt-get clean

RUN git clone https://github.com/markdownlint/markdownlint.git \
    && cd markdownlint && git checkout v0.4.0 && rake install

RUN git clone https://github.com/client9/misspell.git \
    && cd misspell && curl -L -o ./install-misspell.sh https://git.io/misspell && sh ./install-misspell.sh

RUN mv misspell/bin/misspell /usr/local/bin/

Ⅱ. Does this pull request fix one issue?

none

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

This addition would checkout one typo.

Ⅴ. Special notes for reviews

none

@allencloud
Copy link
Collaborator Author

In this test, we have already found:

misspell -error ./**/* | grep -v extra | grep -v vendor
pkg/errtypes/errors.go:32:51: "useing" is a misspelling of "using"
Exited with code 2

So it turns out that misspell works very well.

@codecov-io
Copy link

codecov-io commented May 10, 2018

Codecov Report

Merging #1304 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1304      +/-   ##
==========================================
+ Coverage   16.42%   16.45%   +0.02%     
==========================================
  Files         182      182              
  Lines       11303    11285      -18     
==========================================
  Hits         1857     1857              
+ Misses       9310     9292      -18     
  Partials      136      136
Impacted Files Coverage Δ
pkg/errtypes/errors.go 31.57% <ø> (ø) ⬆️
daemon/mgr/network.go 3.48% <0%> (+0.16%) ⬆️

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allencloud Forgot to execute misspell? xargs misspell -error

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, Thanks goodness. I am afraid I made a mistake in git commit.

@allencloud allencloud force-pushed the add-misspell branch 2 times, most recently from 27ea329 to 87a2671 Compare May 11, 2018 05:55
@allencloud
Copy link
Collaborator Author

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label May 13, 2018
@allencloud allencloud merged commit 5a7236d into AliyunContainerService:master May 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants