feat(pre-commit): Added linting

This commit is contained in:
Tuan-Dat Tran
2025-07-27 22:46:23 +02:00
parent 2882abfc0b
commit 6eef96b302
18 changed files with 57 additions and 25 deletions

23
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: ansible-galaxy-install
name: Install ansible-galaxy collections
entry: ansible-galaxy collection install -r requirements.yml
language: system
pass_filenames: false
always_run: true
- repo: https://github.com/ansible/ansible-lint
rev: v6.22.2
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
additional_dependencies:
- ansible-core==2.15.8