From b3887ee3a749e361d958d2089b0dd8b39d66dcfc Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Thu, 7 Jul 2022 19:59:38 +0200 Subject: Use pre-commit in CI to fix trailing blanks & tabs Signed-off-by: guillaume.lambert Change-Id: I7e2d918ced690624df44ef8a84df865aa8505b40 (cherry picked from commit beaf6055d77b00dc4ff90165512d2877afc7b79d) --- .pre-commit-config.yaml | 16 ++++++++++++++++ 1 file changed, 16 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..323386c88 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + exclude: '.patch$' + # trailing blanks shall not preferably be fixed in patch files + + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.4.2 + hooks: + - id: remove-tabs + stages: [commit] + exclude: '^(.git/|docs/make.bat|docs/Makefile|)' + -- cgit 1.2.3-korg