Unverified Commit 8d7b6f92 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[docs] [ci] automatically re-generate parameter docs via pre-commit (#7001)

parent 97ff7087
...@@ -139,12 +139,6 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then ...@@ -139,12 +139,6 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
linkchecker --config=./docs/.linkcheckerrc ./docs/_build/html/*.html || exit 1 linkchecker --config=./docs/.linkcheckerrc ./docs/_build/html/*.html || exit 1
exit 0 exit 0
fi fi
# check the consistency of parameters' descriptions and other stuff
cp ./docs/Parameters.rst ./docs/Parameters-backup.rst
cp ./src/io/config_auto.cpp ./src/io/config_auto-backup.cpp
python ./.ci/parameter-generator.py || exit 1
diff ./docs/Parameters-backup.rst ./docs/Parameters.rst || exit 1
diff ./src/io/config_auto-backup.cpp ./src/io/config_auto.cpp || exit 1
exit 0 exit 0
fi fi
......
...@@ -27,6 +27,15 @@ repos: ...@@ -27,6 +27,15 @@ repos:
hooks: hooks:
- id: yamllint - id: yamllint
args: ["--strict"] args: ["--strict"]
- repo: local
hooks:
- id: regenerate-parameters
name: regenerate-parameters
entry: python
args:
- ./.ci/parameter-generator.py
language: python
pass_filenames: false
- repo: https://github.com/rstcheck/rstcheck - repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5 rev: v6.2.5
hooks: hooks:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment