Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 line
3.1KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. # See https://pre-commit.com for more information
  5. # See https://pre-commit.com/hooks.html for more hooks
  6. ci:
  7. autofix_commit_msg: |
  8. ci(pre-commit.ci): apply auto fixes from pre-commit.com hooks
  9. For more information, see https://pre-commit.ci
  10. autofix_prs: true
  11. autoupdate_branch: ''
  12. autoupdate_commit_msg: |
  13. ci(pre-commit.ci): perform `pre-commit` autoupdate
  14. autoupdate_schedule: quarterly
  15. skip: []
  16. submodules: false
  17. default_stages: [Nonepre-commitNone]
  18. repos:
  19. - repo: https://github.com/dafyddj/commitlint-pre-commit-hook
  20. rev: v2.3.0
  21. hooks:
  22. - id: commitlint
  23. name: Check commit message using commitlint
  24. description: Lint commit message against @commitlint/config-conventional rules
  25. stages: [commit-msg]
  26. additional_dependencies: ['@commitlint/config-conventional@17.1.0']
  27. - repo: https://github.com/rubocop-hq/rubocop
  28. rev: v1.66.1
  29. hooks:
  30. - id: rubocop
  31. name: Check Ruby files with rubocop
  32. args: [--debug]
  33. always_run: true
  34. pass_filenames: false
  35. - repo: https://github.com/shellcheck-py/shellcheck-py
  36. rev: v0.10.0.1
  37. hooks:
  38. - id: shellcheck
  39. name: Check shell scripts with shellcheck
  40. files: ^.*\.(sh|bash|ksh)$
  41. types: []
  42. - repo: https://github.com/adrienverge/yamllint
  43. rev: v1.35.1
  44. hooks:
  45. - id: yamllint
  46. name: Check YAML syntax with yamllint
  47. args: [--strict]
  48. types: [file]
  49. # Files to include
  50. # 1. Obvious YAML files
  51. # 2. `pillar.example` and similar files
  52. # 3. SLS files under directory `test/` which are pillar files
  53. # Files to exclude
  54. # 1. SLS files under directory `test/` which are state files
  55. # 2. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
  56. # 3. YAML files heavily reliant on Jinja
  57. files: |
  58. (?x)^(
  59. .*\.yaml|
  60. .*\.yml|
  61. \.salt-lint|
  62. \.yamllint|
  63. .*\.example|
  64. test/.*\.sls
  65. )$
  66. exclude: |
  67. (?x)^(
  68. kitchen.vagrant.yml|
  69. test/.*/states/.*\.sls|
  70. salt/osfamilymap.yaml|
  71. salt/osmap.yaml|
  72. salt/osfingermap.yaml
  73. )$
  74. - repo: https://github.com/warpnet/salt-lint
  75. rev: v0.9.2
  76. hooks:
  77. - id: salt-lint
  78. name: Check Salt files using salt-lint
  79. files: ^.*\.(sls|jinja|j2|tmpl|tst)$
  80. - repo: https://github.com/rstcheck/rstcheck
  81. rev: v6.2.4
  82. hooks:
  83. - id: rstcheck
  84. name: Check reST files using rstcheck
  85. exclude: 'docs/CHANGELOG.rst'
  86. additional_dependencies: [sphinx==7.2.6]
  87. - repo: https://github.com/saltstack-formulas/mirrors-rst-lint
  88. rev: v1.4.0
  89. hooks:
  90. - id: rst-lint
  91. name: Check reST files using rst-lint
  92. exclude: |
  93. (?x)^(
  94. docs/CHANGELOG.rst|
  95. docs/TOFS_pattern.rst|
  96. )$
  97. additional_dependencies: [pygments==2.16.1]