Skip to content

Commit

Permalink
feat: add doc link checker (#1130)
Browse files Browse the repository at this point in the history
Signed-off-by: Tianchu Zhao <[email protected]>
  • Loading branch information
tczhao committed Oct 2, 2023
1 parent dae11a7 commit 408ff38
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -227,17 +227,29 @@ endif

/usr/local/bin/mkdocs:
$(PYTHON) -m pip install mkdocs==1.3.0 mkdocs_material==8.3.9 mkdocs-embed-external-markdown==2.3.0
/usr/local/bin/lychee:
ifeq (, $(shell which lychee))
ifeq ($(shell uname),Darwin)
brew install lychee
else
curl -sSfL https://github.com/lycheeverse/lychee/releases/download/v0.13.0/lychee-v0.13.0-$(shell uname -m)-unknown-linux-gnu.tar.gz | sudo tar xz -C /usr/local/bin/
endif
endif

# docs

.PHONY: docs
docs: /usr/local/bin/mkdocs
docs: /usr/local/bin/mkdocs docs-linkcheck
mkdocs build

.PHONY: docs-serve
docs-serve: docs
mkdocs serve

.PHONY: docs-linkcheck
docs-linkcheck: /usr/local/bin/lychee
lychee --exclude-path=CHANGELOG.md --exclude-mail *.md

# pre-push checks

.git/hooks/%: hack/git/hooks/%
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Security vulnerabilities will be disclosed via [release notes](https://github.co

## Vulnerability Scanning

See [static code analysis](docs/static-code-analysis.md).
See [static code analysis](docs/development/static-code-analysis.md).

0 comments on commit 408ff38

Please sign in to comment.