Skip to content

Commit

Permalink
feat(pre-commit): enable/disable rstcheck as relevant
Browse files Browse the repository at this point in the history
Completes #259 except for 5 remaining formulas.
  • Loading branch information
myii committed Oct 4, 2020
1 parent 05b36eb commit f3a91e8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ repos:
- id: salt-lint
name: Check Salt files using salt-lint
files: ^.*\.(sls|jinja|j2|tmpl|tst)$
# - repo: https://github.com/myint/rstcheck
# rev: 3f929574
# hooks:
# - id: rstcheck
# name: Check reST files using rstcheck
# args: [--report=warning]
- repo: https://github.com/myint/rstcheck
rev: 3f929574
hooks:
- id: rstcheck
name: Check reST files using rstcheck
args: [--report=warning]
1 change: 1 addition & 0 deletions ssf/config/formulas.sls
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ prepare-git-branch-for-{{ formula }}:
platforms: {{ context.platforms | yaml }}
platforms_matrix: {{ context.platforms_matrix | yaml }}
platforms_matrix_commented_includes: {{ context.platforms_matrix_commented_includes | yaml }}
pre_commit: {{ context.pre_commit | yaml }}
rubocop: {{ context.rubocop | yaml }}
salt_lint: {{ context.salt_lint | yaml }}
saltimages: {{ ssf.saltimages | yaml }}
Expand Down
7 changes: 5 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,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(pre-commit): add to formula [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/259'
title: "ci(pre-commit): enable/disable '`'rstcheck'`' as relevant [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/262'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down Expand Up @@ -188,6 +188,9 @@ ssf_node_anchors:
# To deal with excessive instances when mimicking `kitchen list -b`
# If values are set, only use these as commented entries in the matrix
platforms_matrix_commented_includes: []
pre_commit:
repos:
use_rstcheck: true
rubocop:
AllCops: {}
Cops:
Expand Down
14 changes: 8 additions & 6 deletions ssf/files/default/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ repos:
- id: salt-lint
name: Check Salt files using salt-lint
files: ^.*\.(sls|jinja|j2|tmpl|tst)$
# - repo: https://github.com/myint/rstcheck
# rev: 3f929574
# hooks:
# - id: rstcheck
# name: Check reST files using rstcheck
# args: [--report=warning]
{%- if pre_commit.repos.use_rstcheck %}
- repo: https://github.com/myint/rstcheck
rev: 3f929574
hooks:
- id: rstcheck
name: Check reST files using rstcheck
args: [--report=warning]
{%- endif %}
8 changes: 8 additions & 0 deletions ssf/formulas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,9 @@ ssf_node_anchors:
- [fedora , 32 , master, 3, default]
- [opensuse/leap, 15.2 , master, 3, default]
- [arch-base , latest, 2019.2, 2, arch]
pre_commit_do_not_use_rstcheck: &pre_commit_do_not_use_rstcheck
repos:
use_rstcheck: false
# yamllint disable-line rule:line-length
travis_do_not_use_single_job_for_linters: &travis_do_not_use_single_job_for_linters
use_single_job_for_linters: false
Expand Down Expand Up @@ -637,6 +640,7 @@ ssf:
- [fedora , 30 , 2018.3, 3, default]
# - [opensuse/leap, 15.1 , 2018.3, 2, default]
- [centos , 6 , 2017.7, 2, default]
pre_commit: *pre_commit_do_not_use_rstcheck
semrel_files: *semrel_files_default
apt:
context:
Expand Down Expand Up @@ -994,6 +998,7 @@ ssf:
- [centos , 7 , 3000.3, 3, default]
- [opensuse/leap, 15.2 , 3000.3, 3, default]
- [fedora , 31 , 2019.2, 3, default]
pre_commit: *pre_commit_do_not_use_rstcheck
use_tofs: true
semrel_files: *semrel_files_default
devstack:
Expand Down Expand Up @@ -1580,6 +1585,7 @@ ssf:
- [opensuse/leap, 15.2 , master, 3, default]
- [amazonlinux , 2 , master, 3, redhat]
# # - [arch-base , latest, 3000.3, 2, arch]
pre_commit: *pre_commit_do_not_use_rstcheck
use_tofs: true
yamllint:
ignore:
Expand Down Expand Up @@ -2402,6 +2408,7 @@ ssf:
- [opensuse/leap, 15.2 , 3000.3, 3, default]
- [fedora , 31 , 2019.2, 3, default]
- [ubuntu , 16.04, 2019.2, 3, default]
pre_commit: *pre_commit_do_not_use_rstcheck
use_libsaltcli: true
use_tofs: true
semrel_files: *semrel_files_default
Expand Down Expand Up @@ -2981,6 +2988,7 @@ ssf:
- [fedora , 31 , master, 3, default]
- [opensuse/leap, 15.2 , master, 3, default]
# # - [arch-base , latest, 3000.3, 2, default]
pre_commit: *pre_commit_do_not_use_rstcheck
use_tofs: true
yamllint:
ignore:
Expand Down

0 comments on commit f3a91e8

Please sign in to comment.