qusal/.pre-commit-config.yaml

97 lines
2.5 KiB
YAML
Raw Normal View History

2024-07-08 05:12:38 -04:00
# yamllint disable-line rule:line-length
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
2023-11-13 09:33:28 -05:00
#
# SPDX-License-Identifier: AGPL-3.0-or-later
2023-11-13 09:33:28 -05:00
---
repos:
- repo: local
hooks:
- id: unicode-prohibit
name: unicode-prohibit
entry: scripts/unicode-prohibit.sh
language: script
pass_filenames: true
description: Prohibit Unicode
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
- id: shell-lint
name: shell-lint
entry: scripts/shell-lint.sh
language: script
pass_filenames: true
description: Lint Shellscripts
- id: markdown-lint
name: markdown-lint
entry: scripts/markdown-lint.sh
language: script
pass_filenames: true
files: \.md$
2024-07-08 05:41:45 -04:00
description: Lint Markdown files
2024-07-05 06:24:24 -04:00
- id: python-lint
name: python-lint
entry: scripts/python-lint.sh
language: script
pass_filenames: true
files: \.py$
2024-07-08 05:41:45 -04:00
description: Lint Python files
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-08 05:41:45 -04:00
files: (^minion.d/.*.conf|\.(sls|top))$
2023-11-13 09:33:28 -05:00
description: Lint Salt files
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
- id: qubesbuilder-gen
name: qubesbuilder-gen
entry: scripts/qubesbuilder-gen.sh
args: [test]
language: script
pass_filenames: false
description: Check if .qubesbuilder is up to date
2024-07-08 05:12:38 -04:00
# TODO: generate temporary spec and compare against staged one.
# - id: spec-gen
# name: spec-gen
# language: script
# entry: scripts/spec-gen.sh test
# args: [test]
# # pass_filenames: true
# description: Check if RPM SPEC files are up to date
2024-07-05 06:24:24 -04:00
- id: reuse-lint
name: reuse-lint
entry: reuse
args: [lint]
language: python
pass_filenames: false
description: Lint files to comply with the REUSE Specification
2024-07-05 06:24:24 -04:00
- id: git-lint
name: git-lint
language: python
entry: gitlint
args: [--staged, --msg-filename]
stages: [commit-msg]
pass_filenames: true
description: Lint Git commits