From e9cd3319cf14b3d9484c4e6d7aa5040509a81653 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 7 Jan 2020 20:46:18 +0000 Subject: 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 --- .pre-commit-config.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .pre-commit-config.yaml (limited to '.pre-commit-config.yaml') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..4de8e4c12 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 -- cgit v1.2.3-54-g00ecf