1
0
Fork 0
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:
Markus Lehtonen 2021-02-25 13:44:01 +02:00
parent a8232ccd2b
commit bc289d0783
3 changed files with 18 additions and 0 deletions

View file

@ -9,6 +9,8 @@ IMAGE_BUILD_EXTRA_OPTS ?=
IMAGE_PUSH_CMD ?= docker push IMAGE_PUSH_CMD ?= docker push
CONTAINER_RUN_CMD ?= docker run CONTAINER_RUN_CMD ?= docker run
MDL ?= mdl
# Docker base command for working with html documentation. # Docker base command for working with html documentation.
# Use host networking because 'jekyll serve' is stupid enough to use the # 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 # same site url than the "host" it binds to. Thus, all the links will be
@ -117,6 +119,9 @@ gofmt-verify:
ci-lint: ci-lint:
golangci-lint run --timeout 5m0s golangci-lint run --timeout 5m0s
mdlint:
find docs/ -path docs/vendor -prune -false -o -name '*.md' | xargs $(MDL) -s docs/mdl-style.rb
test: test:
$(GO_CMD) test ./cmd/... ./pkg/... $(GO_CMD) test ./cmd/... ./pkg/...

6
docs/mdl-style.rb Normal file
View 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
View file

@ -0,0 +1,7 @@
#!/bin/bash -e
# Install mdl
gem install mdl -v 0.11.0
# Run verify steps
make mdlint