2018-01-15 16:12:51 +01:00
|
|
|
repos:
|
2021-10-25 21:10:36 +03:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2023-12-12 17:55:30 +02:00
|
|
|
rev: v4.5.0
|
2018-01-15 16:12:51 +01:00
|
|
|
hooks:
|
2021-09-09 12:38:43 +03:00
|
|
|
# Git style
|
|
|
|
|
- id: check-added-large-files
|
|
|
|
|
- id: check-merge-conflict
|
|
|
|
|
- id: check-vcs-permalinks
|
|
|
|
|
- id: forbid-new-submodules
|
|
|
|
|
- id: no-commit-to-branch
|
|
|
|
|
|
|
|
|
|
# Common errors
|
2018-01-15 16:12:51 +01:00
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
- id: trailing-whitespace
|
2021-09-09 12:38:43 +03:00
|
|
|
args: [--markdown-linebreak-ext=md]
|
2022-04-13 17:04:07 +03:00
|
|
|
exclude: CHANGELOG.md
|
2021-09-09 12:38:43 +03:00
|
|
|
- id: check-yaml
|
2018-01-15 16:12:51 +01:00
|
|
|
- id: check-merge-conflict
|
2018-04-21 11:22:47 +02:00
|
|
|
- id: check-executables-have-shebangs
|
2021-09-09 12:38:43 +03:00
|
|
|
|
|
|
|
|
# Cross platform
|
|
|
|
|
- id: check-case-conflict
|
2021-09-10 22:33:03 +03:00
|
|
|
- id: mixed-line-ending
|
|
|
|
|
args: [--fix=lf]
|
2021-09-09 12:38:43 +03:00
|
|
|
|
|
|
|
|
# Security
|
|
|
|
|
- id: detect-aws-credentials
|
|
|
|
|
args: ['--allow-missing-credentials']
|
|
|
|
|
- id: detect-private-key
|
|
|
|
|
|
|
|
|
|
|
2021-10-25 21:10:36 +03:00
|
|
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
2023-01-30 20:39:33 +02:00
|
|
|
rev: 3.0.0
|
2020-01-21 11:54:13 +01:00
|
|
|
hooks:
|
|
|
|
|
- id: shfmt
|
|
|
|
|
args: ['-l', '-i', '2', '-ci', '-sr', '-w']
|
2022-01-06 15:08:18 +02:00
|
|
|
- id: shellcheck
|
2022-01-11 19:20:29 +02:00
|
|
|
|
|
|
|
|
# Dockerfile linter
|
|
|
|
|
- repo: https://github.com/hadolint/hadolint
|
2023-04-09 10:40:56 +02:00
|
|
|
rev: v2.12.1-beta
|
2022-01-11 19:20:29 +02:00
|
|
|
hooks:
|
|
|
|
|
- id: hadolint
|
|
|
|
|
args: [
|
|
|
|
|
'--ignore', 'DL3027', # Do not use apt
|
|
|
|
|
'--ignore', 'DL3007', # Using latest
|
|
|
|
|
'--ignore', 'DL4006', # Not related to alpine
|
|
|
|
|
'--ignore', 'SC1091', # Useless check
|
|
|
|
|
'--ignore', 'SC2015', # Useless check
|
|
|
|
|
'--ignore', 'SC3037', # Not related to alpine
|
|
|
|
|
'--ignore', 'DL3013', # Pin versions in pip
|
|
|
|
|
]
|
2023-01-27 09:51:53 -08:00
|
|
|
|
|
|
|
|
# JSON5 Linter
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
2023-12-12 17:56:24 +02:00
|
|
|
rev: v3.1.0
|
2023-01-27 09:51:53 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: prettier
|
|
|
|
|
# https://prettier.io/docs/en/options.html#parser
|
|
|
|
|
files: '.json5$'
|