Skip to content

Commit cbc8a10

Browse files
committed
update pre-commit workflow
also removes redundant line/copy-paste error from pre-commit config
1 parent 29de560 commit cbc8a10

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
steps:
1515
- name: Checkout repo
1616
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
# use commit hash to make "no-commit-to-branch" check passing
19+
ref: ${{ github.sha }}
1720

1821
- name: Set up python
1922
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -29,9 +32,9 @@ jobs:
2932
3033
- name: Set up clang-format
3134
run: |
32-
sudo apt-get install -y clang-format-14
35+
sudo apt-get install -y clang-format-18
3336
sudo unlink /usr/bin/clang-format
34-
sudo ln -s /usr/bin/clang-format-14 /usr/bin/clang-format
37+
sudo ln -s /usr/bin/clang-format-18 /usr/bin/clang-format
3538
clang-format --version
3639
3740
- name: Run pre-commit checks

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ repos:
77
- id: no-commit-to-branch
88
name: "ensure no direct commit to master/maintenance branches"
99
args: [--branch, "master", --pattern, "maintenance/.*"]
10-
- id: check-case-conflict
1110
- id: check-illegal-windows-names
1211
# Contents
1312
- id: check-ast

0 commit comments

Comments
 (0)