Skip to content

Commit 078a736

Browse files
ci: sync with template repository
1 parent 8e53f7c commit 078a736

File tree

2 files changed

+39
-56
lines changed

2 files changed

+39
-56
lines changed

.github/workflows/pre-commit.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pre-commit
2+
3+
on:
4+
push:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
9+
jobs:
10+
pre-commit:
11+
name: pre-commit
12+
permissions:
13+
contents: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: pre-commit
19+
uses: liblaf/template/.github/actions/pre-commit@main
20+
with:
21+
autofix: true

.pre-commit-config.yaml

+18-56
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
ci:
2-
autofix_commit_msg: |
3-
ci(pre-commit): auto fixes from pre-commit.com hooks
4-
5-
for more information, see https://pre-commit.ci
6-
autoupdate_commit_msg: |
7-
ci(pre-commit): pre-commit autoupdate
2+
autofix_commit_msg: "ci(pre-commit): auto fixes from pre-commit.com hooks"
3+
autoupdate_commit_msg: "ci(pre-commit): pre-commit autoupdate"
84
skip:
95
- cargo-check
106
- cargo-clippy
@@ -13,14 +9,14 @@ ci:
139
- latexindent
1410
- poetry-lock
1511
- shellcheck
16-
1712
repos:
1813
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.1.14
14+
rev: v0.2.1
2015
hooks:
2116
- id: ruff
2217
args:
2318
- --fix
19+
- --unsafe-fixes
2420
- id: ruff-format
2521
- repo: https://github.com/cmhughes/latexindent.pl
2622
rev: V3.23.6
@@ -37,7 +33,7 @@ repos:
3733
- --modifylinebreaks
3834
- --GCString
3935
- repo: https://github.com/commitizen-tools/commitizen
40-
rev: v3.13.0
36+
rev: v3.14.1
4137
hooks:
4238
- id: commitizen
4339
- repo: https://github.com/koalaman/shellcheck-precommit
@@ -47,6 +43,14 @@ repos:
4743
files: \.(bash|sh|zsh)(\.tmpl)?$
4844
types:
4945
- text
46+
- repo: https://github.com/liblaf/template
47+
rev: main
48+
hooks:
49+
- id: cargo-check
50+
- id: cargo-clippy
51+
- id: cargo-fmt
52+
- id: cargo-test
53+
- id: prettier
5054
- repo: https://github.com/pre-commit/mirrors-clang-format
5155
rev: v17.0.6
5256
hooks:
@@ -85,7 +89,7 @@ repos:
8589
- id: name-tests-test
8690
- id: trailing-whitespace
8791
- repo: https://github.com/python-jsonschema/check-jsonschema
88-
rev: 0.27.3
92+
rev: 0.28.0
8993
hooks:
9094
- id: check-dependabot
9195
- id: check-github-actions
@@ -94,15 +98,15 @@ repos:
9498
rev: 1.7.0
9599
hooks:
96100
- id: poetry-check
97-
- id: poetry-lock
98101
- id: poetry-export
99102
args:
100103
- --output=requirements.txt
101104
- --without-hashes
102105
- --without-urls
103106
- id: poetry-install
107+
- id: poetry-lock
104108
- repo: https://github.com/scop/pre-commit-shfmt
105-
rev: v3.7.0-4
109+
rev: v3.8.0-1
106110
hooks:
107111
- id: shfmt
108112
files: \.(bash|sh|zsh)(\.tmpl)?$
@@ -115,55 +119,13 @@ repos:
115119
- --case-indent
116120
- --space-redirects
117121
- repo: https://github.com/sirosen/texthooks
118-
rev: 0.6.3
122+
rev: 0.6.4
119123
hooks:
120-
# - id: fix-smartquotes
124+
- id: alphabetize-codeowners
121125
- id: fix-ligatures
122126
- id: fix-spaces
123127
- id: forbid-bidi-controls
124-
- id: alphabetize-codeowners
125128
- repo: https://github.com/streetsidesoftware/cspell-cli
126129
rev: v8.3.0
127130
hooks:
128131
- id: cspell
129-
- repo: local
130-
hooks:
131-
- id: cargo-check
132-
name: cargo check
133-
entry: cargo check
134-
language: rust
135-
types:
136-
- rust
137-
pass_filenames: false
138-
- id: cargo-clippy
139-
name: cargo clippy
140-
entry: cargo clippy
141-
language: rust
142-
types:
143-
- rust
144-
pass_filenames: false
145-
- id: cargo-fmt
146-
name: cargo fmt
147-
entry: cargo fmt
148-
language: rust
149-
types:
150-
- rust
151-
pass_filenames: false
152-
- id: cargo-test
153-
name: cargo test
154-
entry: cargo test
155-
language: rust
156-
types:
157-
- rust
158-
pass_filenames: false
159-
- id: prettier
160-
name: Prettier
161-
entry: prettier --write --ignore-unknown
162-
language: node
163-
types:
164-
- text
165-
additional_dependencies:
166-
- prettier@latest
167-
168-
default_stages:
169-
- pre-commit

0 commit comments

Comments
 (0)