Skip to content

Commit

Permalink
linter: add markdown-link-check to check links whether alive
Browse files Browse the repository at this point in the history
Signed-off-by: Allen Sun <[email protected]>
  • Loading branch information
allencloud committed Nov 11, 2018
1 parent e6e9c1a commit d016874
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ jobs:
docker:
# this image is build from Dockerfile
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
- image: pouchcontainer/pouchlinter:v0.1
- image: pouchcontainer/pouchlinter:v0.1.1
working_directory: /go/src/github.com/alibaba/pouch
steps:
- checkout
- run:
name: use markdownlint v0.5.0 to lint markdown file (https://github.com/markdownlint/markdownlint)
command: |
find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036
- run:
name: use markdown-link-check(https://github.com/tcort/markdown-link-check) to check links in markdown files
command: |
for name in $(find . -name \*.md | grep -v vendor | grep -v CHANGELOG); do markdown-link-check -q $name; code=$?; if [ $code -ne 0 ]; then exitCode=1; fi; done; bash -c "exit $exitCode"
- run:
name: use opensource tool client9/misspell to correct commonly misspelled English words
command: |
Expand All @@ -26,20 +30,18 @@ jobs:
code-check:
docker:
- image: pouchcontainer/pouchlinter:v0.1
- image: pouchcontainer/pouchlinter:v0.1.1
working_directory: /go/src/github.com/alibaba/pouch
steps:
- checkout
- run:
name: validate swagger.yml
command: |
swagger validate "/go/src/github.com/alibaba/pouch/apis/swagger.yml"
swagger validate "/go/src/github.com/alibaba/pouch/apis/swagger.yml"
- run:
name: validate go code with gometalinter
command: |
gometalinter --disable-all --skip vendor -E gofmt -E goimports -E golint -E ineffassign -E misspell -E vet -E megacheck ./...
- run:
name: detect deadcode without test folder
command: |
Expand Down

0 comments on commit d016874

Please sign in to comment.