feat: Add pre-commit

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2024-04-27 17:31:37 +02:00
parent 7b2b1b8329
commit 0063f2157c
No known key found for this signature in database
GPG key ID: A2EB1F2CA8E3F677
7 changed files with 30 additions and 7 deletions

15
.github/workflows/pre-commit.yml vendored Normal file
View file

@ -0,0 +1,15 @@
---
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1

9
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,9 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace

View file

@ -3,4 +3,3 @@
{% for command in nrpe_commands | default([]) %}
command[{{ command['name'] }}]={{ command['line'] }}
{% endfor %}