mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.4.0
|
|
hooks:
|
|
# 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
|
|
- id: end-of-file-fixer
|
|
- id: trailing-whitespace
|
|
args: [--markdown-linebreak-ext=md]
|
|
exclude: CHANGELOG.md
|
|
- id: check-yaml
|
|
- id: check-merge-conflict
|
|
- id: check-executables-have-shebangs
|
|
|
|
# Cross platform
|
|
- id: check-case-conflict
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
|
|
# Security
|
|
- id: detect-aws-credentials
|
|
args: ['--allow-missing-credentials']
|
|
- id: detect-private-key
|
|
|
|
|
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
|
rev: 3.0.0
|
|
hooks:
|
|
- id: shfmt
|
|
args: ['-l', '-i', '2', '-ci', '-sr', '-w']
|
|
- id: shellcheck
|
|
|
|
# Dockerfile linter
|
|
- repo: https://github.com/hadolint/hadolint
|
|
rev: v2.12.0
|
|
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
|
|
]
|
|
|
|
# JSON5 Linter
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v3.0.0-alpha.4
|
|
hooks:
|
|
- id: prettier
|
|
# https://prettier.io/docs/en/options.html#parser
|
|
files: '.json5$'
|