2024-07-08 05:12:38 -04:00
|
|
|
# yamllint disable-line rule:line-length
|
2024-07-04 11:10:11 -04:00
|
|
|
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
2023-11-13 09:33:28 -05:00
|
|
|
#
|
2024-07-04 11:10:11 -04:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-11-13 09:33:28 -05:00
|
|
|
|
|
|
|
---
|
2024-07-10 08:36:05 -04:00
|
|
|
|
|
|
|
default_install_hook_types:
|
|
|
|
- pre-commit
|
|
|
|
|
2023-11-13 09:33:28 -05:00
|
|
|
repos:
|
2024-07-10 08:36:05 -04:00
|
|
|
|
2023-11-13 09:33:28 -05:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
2024-03-14 07:09:49 -04:00
|
|
|
|
2024-07-10 09:06:11 -04:00
|
|
|
- id: unicode-lint
|
|
|
|
name: unicode-lint
|
|
|
|
entry: scripts/unicode-lint.sh
|
2024-03-14 07:09:49 -04:00
|
|
|
language: script
|
|
|
|
pass_filenames: true
|
|
|
|
description: Prohibit Unicode
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-03-14 07:09:49 -04:00
|
|
|
|
2024-07-08 05:12:38 -04:00
|
|
|
- id: spell-lint
|
|
|
|
name: spell-lint
|
|
|
|
entry: scripts/spell-lint.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: true
|
|
|
|
description: Spellcheck files
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-07-08 05:12:38 -04:00
|
|
|
|
2024-07-06 16:25:54 -04:00
|
|
|
- id: shell-lint
|
|
|
|
name: shell-lint
|
|
|
|
entry: scripts/shell-lint.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: true
|
2024-07-08 11:06:00 -04:00
|
|
|
# yamllint disable rule:line-length
|
2024-07-09 11:42:07 -04:00
|
|
|
files: >-
|
|
|
|
(\.sh|/rc\.local\.d/.*\.rc|/bin/.*|/rpc/.*|/network-hooks\.d/.*|
|
|
|
|
/qubes-firewall\.d/.*|/(lib-)?qubes-bind-dirs\.d/.*|
|
|
|
|
/\.config/(sh|bash|zsh|less|x11|git/shell|git/template/hooks)/.*|
|
|
|
|
/autostart-scripts/.*|/qvm-copy-dotfiles|/git-core/.*)
|
2024-07-08 11:06:00 -04:00
|
|
|
# yamllint disable rule:line-length
|
2024-07-09 11:42:07 -04:00
|
|
|
exclude: >-
|
|
|
|
\.(policy|asc|txt|top|sls|jinja|toml|vim|py|muttrc|nft|md|spec|
|
|
|
|
list|sources|repo|socket|timer|service|y(a)?ml)$
|
2024-07-06 16:25:54 -04:00
|
|
|
description: Lint Shellscripts
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-03-14 07:09:49 -04:00
|
|
|
|
2024-07-04 11:10:11 -04:00
|
|
|
- id: markdown-lint
|
|
|
|
name: markdown-lint
|
|
|
|
entry: scripts/markdown-lint.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: true
|
2024-07-06 16:25:54 -04:00
|
|
|
files: \.md$
|
2024-07-08 05:41:45 -04:00
|
|
|
description: Lint Markdown files
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-07-04 11:10:11 -04:00
|
|
|
|
2024-07-05 06:24:24 -04:00
|
|
|
- id: python-lint
|
|
|
|
name: python-lint
|
|
|
|
entry: scripts/python-lint.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: true
|
2024-07-06 16:25:54 -04:00
|
|
|
files: \.py$
|
2024-07-08 05:41:45 -04:00
|
|
|
description: Lint Python files
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-07-05 06:24:24 -04:00
|
|
|
|
2023-11-13 09:33:28 -05:00
|
|
|
- id: salt-lint
|
|
|
|
name: salt-lint
|
|
|
|
entry: scripts/salt-lint.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: true
|
2024-07-18 06:23:38 -04:00
|
|
|
files: (^minion.d/.*.conf|\.(sls|top|jinja|j2|tmpl|tst))$
|
2023-11-13 09:33:28 -05:00
|
|
|
description: Lint Salt files
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-03-14 07:09:49 -04:00
|
|
|
|
2024-07-08 05:12:38 -04:00
|
|
|
- id: yaml-lint
|
|
|
|
name: yaml-lint
|
|
|
|
entry: scripts/yaml-lint.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: true
|
|
|
|
files: \.(yaml|yml)$
|
|
|
|
description: Lint YAML files
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-07-08 05:12:38 -04:00
|
|
|
|
2024-06-22 03:04:18 -04:00
|
|
|
- id: qubesbuilder-gen
|
|
|
|
name: qubesbuilder-gen
|
|
|
|
entry: scripts/qubesbuilder-gen.sh
|
|
|
|
args: [test]
|
2024-06-12 08:44:04 -04:00
|
|
|
language: script
|
2024-06-22 03:04:18 -04:00
|
|
|
pass_filenames: false
|
2024-07-08 11:06:00 -04:00
|
|
|
files: salt/\S+/README.md
|
2024-06-12 08:44:04 -04:00
|
|
|
description: Check if .qubesbuilder is up to date
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
2024-06-21 11:00:06 -04:00
|
|
|
|
2024-08-16 05:59:49 -04:00
|
|
|
# - id: spec-gen
|
|
|
|
# name: spec-gen
|
|
|
|
# language: script
|
|
|
|
# entry: scripts/spec-gen.sh
|
|
|
|
# args: [test]
|
|
|
|
# pass_filenames: true
|
|
|
|
# # yamllint disable rule:line-length
|
|
|
|
# files: >-
|
|
|
|
# ^(rpm_spec/template/template.spec|salt/.*|
|
|
|
|
# scripts/spec-(get|gen)\.sh)$
|
|
|
|
# description: Check if RPM SPEC files are up to date
|
2024-10-25 05:18:52 -04:00
|
|
|
# stages: [commit]
|
2024-07-05 06:24:24 -04:00
|
|
|
|
2024-07-08 09:21:49 -04:00
|
|
|
- id: license-lint
|
|
|
|
name: license-lint
|
2024-07-06 16:25:54 -04:00
|
|
|
entry: reuse
|
|
|
|
args: [lint]
|
|
|
|
language: python
|
|
|
|
pass_filenames: false
|
|
|
|
description: Lint files to comply with the REUSE Specification
|
2024-10-25 05:18:52 -04:00
|
|
|
stages: [commit]
|
|
|
|
|
|
|
|
- id: commit-verify
|
|
|
|
name: commit-verify
|
|
|
|
entry: scripts/commit-verify.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: false
|
|
|
|
description: Verify if there is a valid signature associated with the revisions
|
|
|
|
stages: [push]
|