mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
docs: enable markdown linting
This commit is contained in:
parent
a8232ccd2b
commit
bc289d0783
3 changed files with 18 additions and 0 deletions
5
Makefile
5
Makefile
|
@ -9,6 +9,8 @@ IMAGE_BUILD_EXTRA_OPTS ?=
|
|||
IMAGE_PUSH_CMD ?= docker push
|
||||
CONTAINER_RUN_CMD ?= docker run
|
||||
|
||||
MDL ?= mdl
|
||||
|
||||
# Docker base command for working with html documentation.
|
||||
# Use host networking because 'jekyll serve' is stupid enough to use the
|
||||
# same site url than the "host" it binds to. Thus, all the links will be
|
||||
|
@ -117,6 +119,9 @@ gofmt-verify:
|
|||
ci-lint:
|
||||
golangci-lint run --timeout 5m0s
|
||||
|
||||
mdlint:
|
||||
find docs/ -path docs/vendor -prune -false -o -name '*.md' | xargs $(MDL) -s docs/mdl-style.rb
|
||||
|
||||
test:
|
||||
$(GO_CMD) test ./cmd/... ./pkg/...
|
||||
|
||||
|
|
6
docs/mdl-style.rb
Normal file
6
docs/mdl-style.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
all
|
||||
# Exclude MD041 - First line in file should be a top level header
|
||||
exclude_rule 'MD041'
|
||||
rule 'MD013', :tables => false
|
||||
rule 'MD013', :code_blocks => false
|
||||
rule 'MD024', :allow_different_nesting => true
|
7
scripts/test-infra/mdlint.sh
Executable file
7
scripts/test-infra/mdlint.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Install mdl
|
||||
gem install mdl -v 0.11.0
|
||||
|
||||
# Run verify steps
|
||||
make mdlint
|
Loading…
Reference in a new issue