Skip to content

Commit

Permalink
lint: add markdownlint to linting
Browse files Browse the repository at this point in the history
  • Loading branch information
aauren committed Oct 19, 2023
1 parent dad4991 commit eb30de9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
MD046:
style: fenced
MD013:
line_length: 120
code_blocks: false
MD045: false
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GO_MOD_CACHE?=$(shell go env GOMODCACHE)
BUILDTIME_BASE?=$(DOCKER_BUILD_IMAGE)
RUNTIME_BASE?=alpine:3.18
DOCKER_LINT_IMAGE?=golangci/golangci-lint:v1.54.2
DOCKER_MARKDOWNLINT_IMAGE?=tmknom/markdownlint:0.37.0
GOBGP_VERSION=v3.19.0
QEMU_IMAGE?=multiarch/qemu-user-static
GORELEASER_VERSION=v1.21.2
Expand Down Expand Up @@ -91,7 +92,7 @@ else
go test -v -timeout 30s github.com/cloudnativelabs/kube-router/v2/cmd/kube-router/ github.com/cloudnativelabs/kube-router/v2/pkg/...
endif

lint: gofmt
lint: gofmt markdownlint
ifeq "$(BUILD_IN_DOCKER)" "true"
$(DOCKER) run -v $(PWD):/go/src/github.com/cloudnativelabs/kube-router \
-v $(GO_CACHE):/root/.cache/go-build \
Expand All @@ -103,6 +104,9 @@ else
golangci-lint run ./...
endif

markdownlint:
$(DOCKER) run -v $(PWD):/work $(DOCKER_MARKDOWNLINT_IMAGE) -- README.md docs

run: kube-router ## Runs "kube-router --help".
./kube-router --help

Expand Down Expand Up @@ -231,6 +235,6 @@ help:

.PHONY: clean container run release goreleaser push gofmt gofmt-fix gomoqs
.PHONY: test lint docker-login push-manifest push-manifest-release
.PHONY: push-release github-release help multiarch-binverify
.PHONY: push-release github-release help multiarch-binverify markdownlint

.DEFAULT: all

0 comments on commit eb30de9

Please sign in to comment.