diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2023-05-03 09:43:27 -0700 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2023-05-03 09:48:10 -0700 |
commit | ea19c6d168efa7c5a4533f67a4e41ac171b45d9c (patch) | |
tree | 41d8f8749b630ff5acab54beaf0de772bf851a0f /.pre-commit-config.yaml | |
parent | 86af1067030c622c32ebfa0246482bd69ba45411 (diff) |
CI: Configure and enable pre-commit
Change-Id: I7acbeb2b024a7ca81df36fcea8c6c1f052b7f24f
Issue-ID: CIMAN-33
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r-- | .pre-commit-config.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..ca94141f5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,32 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: check-executables-have-shebangs + stages: [manual] + - id: check-json + exclude: (.vscode|.devcontainer) + - id: no-commit-to-branch + args: + - --branch=dev + - --branch=master + - --branch=main + - --branch=rc + + - repo: https://github.com/jorisroovers/gitlint + rev: v0.19.1 + hooks: + - id: gitlint + + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.31.0 + hooks: + - id: yamllint + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.0-alpha.9-for-vscode + hooks: + - id: prettier + stages: [commit] |