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 af17db3 commit c805fc0
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details

version: 2
jobs:
markdownlint-misspell-shellcheck:
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.2
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: |
set +e
for name in $(find . -name \*.md | grep -v vendor | grep -v CHANGELOG); do
if [ -f $name ]; then
markdown-link-check -q $name;
if [ $? -ne 0 ]; then
code=1
fi
fi
done
bash -c "exit $code";
- run:
name: use opensource tool client9/misspell to correct commonly misspelled English words
command: |
Expand All @@ -26,15 +40,14 @@ jobs:
code-check:
docker:
- image: pouchcontainer/pouchlinter:v0.1
- image: pouchcontainer/pouchlinter:v0.1.2
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: |
Expand Down

0 comments on commit c805fc0

Please sign in to comment.