Skip to content

Commit

Permalink
chore: update woke config (#642)
Browse files Browse the repository at this point in the history
* fix(docs/Makefile): fixed woke utility skipping .*ignore files

* fix(docs/Makefile): woke now fails tests on non-compliance

* fix(docs/Makefile): woke now only tests on canonical/Inclusive-naming config

* fix(docs/Makefile): fixed inline comment typo

* refactor(docs/Makefile): initial cd is more robust

---------

Co-authored-by: Tiago Nobrega <[email protected]>
Co-authored-by: Cristovao Cordeiro <[email protected]>
  • Loading branch information
3 people authored Jul 23, 2024
1 parent 6921177 commit 8042e14
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ BUILDDIR = _build
VENV = env/bin/activate
PORT = 8080

# Locate this directory relative to the repository root. See woke recipe.
REPOROOT = $(shell git rev-parse --show-toplevel)
RELCWD = $(shell realpath --relative-to=$(REPOROOT) $(CURDIR))

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Expand Down Expand Up @@ -39,7 +43,14 @@ linkcheck:

woke:
type woke >/dev/null 2>&1 || { snap install woke; exit 1; }
woke *.rst **/*.rst -c https://github.com/canonical-web-and-design/Inclusive-naming/raw/main/config.yml

# Woke appears to have an issue where it skips .*ignore files unless it is executed from the repo root.
# This is mitigated by changing to the repo root and running woke on the relative docs path.
# Tested on 19/07/24 with woke 0.19.0-4-g5d52c15
cd $(REPOROOT); woke $(RELCWD)/**/*.rst $(RELCWD)/*.rst \
-c https://github.com/canonical-web-and-design/Inclusive-naming/raw/main/config.yml \
--disable-default-rules \
--exit-1-on-failure

.PHONY: help Makefile

Expand Down

0 comments on commit 8042e14

Please sign in to comment.