Skip to content

Commit

Permalink
Add checkdocs, checkrst, and checkmd make targets.
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fontein <felix@fontein.de>
  • Loading branch information
felixfontein committed Sep 16, 2023
1 parent cacd6f5 commit 51851ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- name: Install rstcheck
run: pip install rstcheck
- name: Install rstcheck and markdownlint
run: |
pip install rstcheck
sudo gem install mdl
- name: Run rstcheck on all RST files
run: rstcheck $(find -name '*.rst')

- name: Install markdownlint
run: sudo gem install mdl
run: make checkrst

- name: Run mdl on all MD files
run: mdl $(find -name '*.md')
run: make checkmd
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ vendor:
vet:
$(GO) vet ./...


.PHONY: checkdocs
checkdocs: checkrst checkmd

.PHONY: checkrst
RST_FILES=$(shell find . -name '*.rst' | grep -v /vendor/ | sort)
checkrst: $(RST_FILES)
rstcheck $^

.PHONY: checkmd
MD_FILES=$(shell find . -name '*.md' | grep -v /vendor/ | sort)
checkmd: $(MD_FILES)
mdl $^

.PHONY: test
test: vendor
gpg --import pgp/sops_functional_tests_key.asc 2>&1 1>/dev/null || exit 0
Expand Down

0 comments on commit 51851ed

Please sign in to comment.