whitebox-tempest-plugin/.pre-commit-config.yaml
Sean Mooney aa1aa21a0f add twine check and pre-commit
This change add a minimal pre-commit config to run
a local twine-check hook.

This hook emulates calls tools/twine-check.sh in a venv
which emulates the check made by the test-release-openstack
zuul job.

This can be run locally via "pre-commit run twine-check -a"
or automtically on commit if you install the pre-commit hooks

This change also add sphinx-lint to lint the readme and
catch common RST issues.

Change-Id: I726838714c591cc06d3bd54a47503bc6e659a0bb
2024-04-19 19:02:33 +01:00

24 lines
581 B
YAML

---
default_language_version:
# force all unspecified python hooks to run python3
python: python3
repos:
- repo: local
hooks:
- id: twine-check
name: twine-check
entry: tools/twine-check.sh
language: python
types: [python]
additional_dependencies: [twine]
args: ['--strict']
exclude: ^$ # don't run on empty files
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
hooks:
- id: sphinx-lint
args: [--enable=default-role]
files: ^README.rst
types: [rst]