Add markdownlint to Circle CI config (#268)
* Add markdownlint to Circle CI config * Use markdownlint instead of markdownlint-cli * Disable line length check (MD013) * Add .mdlrc, .mdlstyle.rb * Disable ordered list item (MD029) * Use .mdlrc in circle ci scripts * Fix errors and update exclusion rules
This commit is contained in:
parent
5ddfcce03c
commit
50cbf3eb55
|
|
@ -2,11 +2,29 @@
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
misspell:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:1.12
|
- image: circleci/golang:1.12
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: Verify
|
name: Misspell check
|
||||||
command: make precommit
|
command: make precommit
|
||||||
|
markdownlint:
|
||||||
|
docker:
|
||||||
|
- image: circleci/ruby:latest
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Install markdownlint
|
||||||
|
command: gem install mdl
|
||||||
|
- run:
|
||||||
|
name: Check markdownlint
|
||||||
|
command: mdl -c .mdlrc .
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build:
|
||||||
|
jobs:
|
||||||
|
- misspell
|
||||||
|
- markdownlint
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
all
|
||||||
|
|
||||||
|
# Multiple headings with the same content allowed for sibling headings
|
||||||
|
rule 'MD024', :allow_different_nesting => true
|
||||||
|
|
||||||
|
# Ordered lists should have increasing prefixes
|
||||||
|
rule 'MD029', :style => :ordered
|
||||||
|
|
||||||
|
# Ignore unordered list style
|
||||||
|
exclude_rule 'MD004'
|
||||||
|
|
||||||
|
# Ignore line length
|
||||||
|
exclude_rule 'MD013'
|
||||||
|
|
||||||
|
# Inline HTML
|
||||||
|
exclude_rule 'MD033'
|
||||||
|
|
||||||
|
# Fenced code blocks should have a language specified
|
||||||
|
exclude_rule 'MD040'
|
||||||
|
|
@ -2,6 +2,11 @@
|
||||||
"rewrap.wrappingColumn": 80,
|
"rewrap.wrappingColumn": 80,
|
||||||
"editor.rulers": [80],
|
"editor.rulers": [80],
|
||||||
"markdownlint.config": {
|
"markdownlint.config": {
|
||||||
"MD013": true
|
"MD004": false,
|
||||||
|
"MD013": false,
|
||||||
|
"MD024": {"allow_different_nesting": true},
|
||||||
|
"MD029": {"style": "ordered"},
|
||||||
|
"MD033": false,
|
||||||
|
"MD040": false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue