summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2018-04-02 15:43:03 +0900
committerIWASE Yusuke <iwase.yusuke0@gmail.com>2018-04-02 16:11:24 +0900
commit79d264bfb008370a6af7ff42dc3962d0bf1ddf63 (patch)
tree56c038fdca9c75614d13fd071cad0e28c06adc49
parent072935c23f9021009c6992c7188855657201ac70 (diff)
travis: Introduce markdownlint
When using IDE (e.g. VSCode), we can easily check the results of markdownlint and it should not be a heavy burden to write docs. This patch introduces an unit test to invoke markdownlint on Travis-CI. See https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md, for configuration details of ".markdownlint.json". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
-rw-r--r--.markdownlint.json13
-rw-r--r--.travis.yml11
2 files changed, 24 insertions, 0 deletions
diff --git a/.markdownlint.json b/.markdownlint.json
new file mode 100644
index 00000000..1f26268a
--- /dev/null
+++ b/.markdownlint.json
@@ -0,0 +1,13 @@
+{
+ "no-hard-tabs": {
+ "code_blocks": false
+ },
+ "line-length": false,
+ "commands-show-output": false,
+ "no-duplicate-header": false,
+ "no-inline-html": {
+ "allowed_elements": [
+ "br"
+ ]
+ }
+} \ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 3f41d97f..48b6f446 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _build: &_build
- go build -o ./gobgp/gobgp ./gobgp/
- go build -o ./gobgpd/gobgpd ./gobgpd/
+_node_js: &_node_js
+ language: node_js
+ node_js: "node"
+
_python: &_python
language: python
python: "2.7"
@@ -194,6 +198,13 @@ matrix:
#
# Tools
#
+ - <<: *_node_js
+ env:
+ - DESCRIPTION="markdownlint"
+ before_script:
+ - npm install -g markdownlint-cli
+ script:
+ - markdownlint $(find . -type f -name '*.md' | grep -v '/vendor/')
- <<: *_python
env:
- DESCRIPTION="Tools"