Skip to content

Commit

Permalink
feat(pre-commit): add rst-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Jul 1, 2021
1 parent f00ec52 commit 25ce78a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,14 @@ repos:
- id: rstcheck
name: Check reST files using rstcheck
exclude: 'docs/CHANGELOG.rst'
- repo: https://github.com/saltstack-formulas/mirrors-rst-lint
rev: v1.3.2
hooks:
- id: rst-lint
name: Check reST files using rst-lint
exclude: |
(?x)^(
docs/CHANGELOG.rst|
docs/TOFS_pattern.rst|
)$
additional_dependencies: [pygments==2.9.0]
4 changes: 2 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length rule:quoted-strings
title: "ci: enable Vagrant-based testing using GitHub Actions"
body: '* Automated using https://github.com/myii/ssf-formula/pull/334'
title: "ci(pre-commit): add '`'rst-lint'`' [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/335'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down
17 changes: 17 additions & 0 deletions ssf/files/default/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,20 @@ repos:
- id: rstcheck
name: Check reST files using rstcheck
exclude: 'docs/CHANGELOG.rst'
- repo: https://github.com/saltstack-formulas/mirrors-rst-lint
rev: v1.3.2
hooks:
- id: rst-lint
name: Check reST files using rst-lint
exclude: |
(?x)^(
docs/CHANGELOG.rst|
docs/TOFS_pattern.rst|
{#- Required until the Antora solution is finalised, which then allows
the `readthedocs` site to be disbanded #}
{%- if semrel_formula == 'template' %}
docs/CONTRIBUTING_DOCS.rst|
docs/index.rst|
{%- endif %}
)$
additional_dependencies: [pygments==2.9.0]

0 comments on commit 25ce78a

Please sign in to comment.