CI/Makefile: Auto format .rst files

This commit is contained in:
Wilson Snyder 2026-06-21 10:22:17 -04:00
parent 5fc03ae913
commit a6ce3517b0
2 changed files with 16 additions and 1 deletions

View File

@ -546,6 +546,13 @@ PY_FILES = \
# Python files, test_regress tests # Python files, test_regress tests
PY_TEST_FILES = test_regress/t/*.py PY_TEST_FILES = test_regress/t/*.py
# reStructuredText Sphinx files
RST_FILES = \
*.rst \
*/*.rst \
ci/docker/*/*.rst \
docs/guide/*.rst \
# YAML files # YAML files
YAML_FILES = \ YAML_FILES = \
.*.yaml \ .*.yaml \
@ -558,7 +565,7 @@ YAML_FILES = \
# Format # Format
format: format:
$(MAKE) -j 5 format-c format-cmake format-exec format-md format-py format-yaml $(MAKE) -j 5 format-c format-cmake format-exec format-md format-py format-rst format-yaml
BEAUTYSH = beautysh BEAUTYSH = beautysh
BEAUTYSH_FLAGS = --indent-size 2 BEAUTYSH_FLAGS = --indent-size 2
@ -609,6 +616,13 @@ format-py yapf:
$(YAPF) --version $(YAPF) --version
$(YAPF) $(YAPF_FLAGS) $(PY_FILES) $(YAPF) $(YAPF_FLAGS) $(PY_FILES)
DOCSTRFMT = docstrfmt
DOCSTRFMT_FLAGS = --line-length 75 --indent-width 3 --keep-blanks --ordered-marker "\#" --preserve-adornments --no-center-section-titles
format-rst:
$(DOCSTRFMT) --version
$(DOCSTRFMT) $(DOCSTRFMT_FLAGS) $(RST_FILES)
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=200 YAMLFIX_preserve_quotes=true yamlfix
YAMLFIX_FLAGS = YAMLFIX_FLAGS =

View File

@ -19,6 +19,7 @@
breathe==4.36.0 breathe==4.36.0
compiledb==0.10.7 compiledb==0.10.7
distro==1.9.0 distro==1.9.0
docstrfmt==2.2.0
gersemi==0.23.1 gersemi==0.23.1
mbake==1.4.3 mbake==1.4.3
mdformat==1.0.0 mdformat==1.0.0