From d82838a84308d702c942f7da13d6ca2613d6ad7e Mon Sep 17 00:00:00 2001 From: Anton Bondarenko Date: Mon, 24 Jun 2024 15:38:47 +0200 Subject: [PATCH 1/2] Replace local Bazel Buildifier hook with automatic one New hook would be able to automatically download specified version of the Buildifier tool instead of relying on local one. Signed-off-by: Anton Bondarenko --- .pre-commit-config.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9a879db..4e237e8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,6 +23,8 @@ repos: - id: check-yaml stages: [ commit ] name: "YAML Syntax" + - id: trailing-whitespace + stages: [ commit ] - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: 2.7.3 hooks: @@ -60,6 +62,13 @@ repos: - id: black stages: [ commit ] name: "Python: Black Formatter" + - repo: https://github.com/Warchant/pre-commit-buildifier + rev: c3e9e6cbb6cab5bb2ff8faf63c31a26b31271fed + hooks: + - id: buildifier + args: [ '--version=v7.1.2' ] + stages: [ commit ] + name: "Bazel: Buildifier" - repo: local hooks: - id: signed-off-checker @@ -72,11 +81,3 @@ repos: description: Ensures that latest commit has been signed-off with `--signoff`. pass_filenames: false stages: [ commit, push ] - - id: bazel-buildifier - name: "Bazel BUILD formatter" - entry: buildifier - description: "Lint Bazel build files" - stages: [ commit ] - language: system - pass_filenames: true - types: [ bazel ] -- GitLab From be9fff0b189952fc3bee08a5be6b92d5bac914dc Mon Sep 17 00:00:00 2001 From: Anton Bondarenko Date: Mon, 1 Jul 2024 11:11:55 +0200 Subject: [PATCH 2/2] fix review comments for !48 p1 Signed-off-by: Anton Bondarenko --- .pre-commit-config.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4e237e8a..51ff28ef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,8 +23,6 @@ repos: - id: check-yaml stages: [ commit ] name: "YAML Syntax" - - id: trailing-whitespace - stages: [ commit ] - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: 2.7.3 hooks: -- GitLab