Skip to content

Commit b40846f

Browse files
authored
Rstcheck config, update, and features (#473)
* Move rstcheck configuration to file * Update rstcheck and enable additional features
1 parent cc1cfcd commit b40846f

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ venv: $(NITROKEY_SDK_PY)
2020

2121
.PHONY: check-syntax
2222
check-syntax: venv
23-
# ignore-messages is needed due to links being used in directives, which
24-
# are not visible by rstcheck as these directives are ignored (mostly faq)
25-
venv/bin/rstcheck --recursive --ignore-directives card,tabs,faq,product-table \
26-
--ignore-messages "faq(.*)Hyperlink target(.*)is not referenced" \
27-
source
23+
venv/bin/rstcheck --config rstcheck.toml --recursive source
2824

2925
.PHONY: check-hyperlinks
3026
check-hyperlinks: venv docs

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MarkupSafe==3.0.2
1212
packaging==24.2
1313
Pygments==2.18.0
1414
requests==2.32.3
15-
rstcheck==6.2.4
15+
rstcheck [sphinx,toml] ==6.2.5
1616
snowballstemmer==2.2.0
1717
soupsieve==2.6
1818
Sphinx==8.1.3

rstcheck.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tool.rstcheck]
2+
ignore_directives = [
3+
"card",
4+
"tabs",
5+
"faq",
6+
"product-table",
7+
]
8+
# ignore-messages is needed due to links being used in directives, which
9+
# are not visible by rstcheck as these directives are ignored (mostly faq)
10+
ignore_messages = "faq(.*)Hyperlink target(.*)is not referenced"
11+

0 commit comments

Comments
 (0)