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 22, 2018
1 parent 5355fe0 commit 5ff6e25
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 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
2 changes: 1 addition & 1 deletion apis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
We encourage PouchContainer users to experience PouchContainer in different ways. When doing this, there are three ways users could choose to interact with Pouchd mostly:

* For end-users, command line tool `pouch` is mostly used.
* For developers, pouchd's raw API is the original thing they would make use of. For more details about API docs, please refer to [api.md](../docs/api/api.md). We should also keep it in mind that doc [api.md](../docs/api/api.md) is automatically generated by [swagger2markup](https://github.com/Swagger2Markup/swagger2markup). Please **DO NOT** edit [api.md](../docs/api/api.md) directly.
* For developers, pouchd's raw API is the original thing they would make use of. For more details about API docs, please refer to [api.md](../docs/api/HTTP_API.md). We should also keep it in mind that doc [api.md](../docs/api/HTTP_API.md) is automatically generated by [swagger2markup](https://github.com/Swagger2Markup/swagger2markup). Please **DO NOT** edit [api.md](../docs/api/HTTP_API.md) directly.
* For golang developers, SDK package [client](../client) is mostly used. For more details about this SDK, please refer to [PouchContainer SDK](https://godoc.org/github.com/alibaba/pouch/client).

Directory `/apis` mainly describes the second part **Pouchd's Raw API**. If taking a look at this directory, we can find that currently it contains the following three kinds of things:
Expand Down

0 comments on commit 5ff6e25

Please sign in to comment.