blob: ad21d4f10d2d105d3f934a27b14a3b022449e6a7 [file]
---
exclude: configure|.+\.in|.+\.m4|LICENSE.OpenSSL
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black, --project, atf, --skip-gitignore]
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
args: [--config, tools/flake8]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude_types: [gif,tar,png,pdf,svg]
exclude: auxdir|expect/globals|jquery\.min\.js
args: [--config, tools/codespellrc]
- id: codespell
alias: codespell-apply
exclude_types: [gif,tar,png,pdf,svg]
exclude: auxdir|expect/globals|jquery\.min\.js
args: [--config, tools/codespellrc, -w]
stages: [manual]
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
args: [--config, tools/gitlint, --msg-filename]
- id: gitlint-ci
alias: gitlint-ci-draft
args: [--config, tools/gitlint]
# Enforce no-fixup/amend commits
- id: gitlint-ci
alias: gitlint-ci-nodraft
args: [--config, tools/gitlint, --contrib, CC2]
# Enforce internal email addresses
- id: gitlint-ci
alias: gitlint-ci-email
args: [--config, tools/gitlint]
- repo: https://github.com/pecigonzalo/pre-commit-shfmt
rev: v2.2.0
hooks:
- id: shell-fmt
files: |
(?x)(
^contribs/slurm_completion_help/|
^testsuite/
)
args:
- --diff
- --write
- --simplify
- --list
- repo: local
hooks:
- id: shellcheck
name: shellcheck
description: Test shell scripts with shellcheck
entry: shellcheck
language: python
types: [shell]
require_serial: true # shellcheck can detect sourcing this way
files: |
(?x)(
^contribs/slurm_completion_help/|
^testsuite/
)
args:
- --severity=warning