feat: Add pre-commit
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
7b2b1b8329
commit
0063f2157c
7 changed files with 30 additions and 7 deletions
15
.github/workflows/pre-commit.yml
vendored
Normal file
15
.github/workflows/pre-commit.yml
vendored
Normal 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
9
.pre-commit-config.yaml
Normal 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
|
|
@ -3,4 +3,3 @@
|
|||
{% for command in nrpe_commands | default([]) %}
|
||||
command[{{ command['name'] }}]={{ command['line'] }}
|
||||
{% endfor %}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue