From ed536614890b5d71eb3990b2c2f81079834c1b71 Mon Sep 17 00:00:00 2001 From: Allen Sun Date: Sun, 11 Nov 2018 21:15:44 +0800 Subject: [PATCH] linter: add markdown-link-check to check links whether alive Signed-off-by: Allen Sun --- .circleci/config.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a614825b86..c43b72b159 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ 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 @@ -15,6 +15,10 @@ jobs: 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 code=1; if [ $code -ne 0 ]; then exitCode=1; fi; done; if [ $exitCode -ne 0 ]; then echo error | grep noerror; fi - run: name: use opensource tool client9/misspell to correct commonly misspelled English words command: | @@ -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: |