From 13b72089caa9acb27550fe83eb5d8fb2b4f04a8d Mon Sep 17 00:00:00 2001 From: dylanhitt Date: Wed, 3 Jul 2024 14:03:17 -0400 Subject: [PATCH] ci: add markdown lint --- .github/workflows/lint.yaml | 16 ++++++++++++++++ .markdownlint.yaml | 9 +++++++++ Makefile | 6 +++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yaml create mode 100644 .markdownlint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..dbe0a3e9 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,16 @@ +name: Lint + +on: + pull_request: + push: + +jobs: + markdownlint: + runs-on: ubuntu-latest + steps: + - name: markdownlint-cli + uses: nosborn/github-action-markdown-cli@v3.3.0 + with: + files: . + config_file: .markdownlint.yaml + dot: true diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 00000000..1fd20734 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,9 @@ +MD001: false + +MD010: false + +MD013: + code_blocks: false + tables: false + +MD033: false diff --git a/Makefile b/Makefile index 2f469c5e..d86c4222 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,10 @@ fmt: lint: go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run +lint-markdown: + markdownlint --fix . + + example: ( cd examples/full-app-gourmet && go run . -debug ) @@ -42,5 +46,5 @@ docs: docs-open: go run golang.org/x/pkgsite/cmd/pkgsite@latest -http localhost:8084 -open -.PHONY: docs-open docs example-watch example lint fmt ci ci-full +.PHONY: docs-open docs example-watch example lint lint-markdown fmt ci ci-full .PHONY: dependencies-analyze build bench cover-web cover test