8000 Merge pull request #8237 from sylvestre/pre-commit-ftl · uutils/coreutils@60bf6cb · GitHub
[go: up one dir, main page]

Skip to content

Commit 60bf6cb

Browse files
authored
Merge pull request #8237 from sylvestre/pre-commit-ftl
add the fluent hook conf file
2 parents ca3fd84 + aa4a85a commit 60bf6cb

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/code-quality.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,43 @@ jobs:
216216
shell: bash
217217
run: |
218218
python3 -m unittest util/test_compare_test_results.py
219+
220+
pre_commit:
221+
name: Pre-commit hooks
222+
runs-on: ubuntu-latest
223+
steps:
224+
- name: Checkout repository
225+
uses: actions/checkout@v4
226+
with:
227+
persist-credentials: false
228+
229+
- name: Setup Rust toolchain
230+
uses: dtolnay/rust-toolchain@master
231+
with:
232+
toolchain: stable
233+
components: rustfmt, clippy
234+
235+
- name: Cache Rust dependencies
236+
uses: Swatinem/rust-cache@v2
237+
238+
- name: Setup Python
239+
uses: actions/setup-python@v5
240+
with:
241+
python-version: '3.x'
242+
243+
- name: Install pre-commit
244+
run: pip install pre-commit
245+
246+
- name: Install cspell
247+
run: npm install -g cspell
248+
249+
- name: Cache pre-commit environments
250+
uses: actions/cache@v4
251+
with:
252+
path: ~/.cache/pre-commit
253+
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
254+
restore-keys: |
255+
pre-commit-${{ runner.os }}-
256+
257+
- name: Run pre-commit
258+
run: pre-commit run

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ repos:
1919
args: [ --fix=lf ]
2020
- id: trailing-whitespace
2121

22+
- repo: https://github.com/uutils/pre-commit-fluent-hook
23+
rev: v0.0.1
24+
hooks:
25+
- id: check-fluent
26+
2227
- repo: local
2328
hooks:
2429
- id: rust-linting

0 commit comments

Comments
 (0)
0