Enable pre-commit tool linting

This should help use keep the codebase more consistent, and avoid sevel
whitespace related issues, or bad file permissions.

pre-commit allows us to easily introduce other linters in follow-ups,
like bashate.

Note: pre-commit tool does *not* install any git-hooks. Making commits
will will call the tool unless you deliverately tell it to install the
hooks.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
This commit is contained in:
Sorin Sbarnea
2020-01-07 20:46:18 +00:00
parent 6c3d383b50
commit e9cd3319cf
11 changed files with 28 additions and 8 deletions

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

@ -0,0 +1,12 @@
---
exclude: ^vendor/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v2.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict