-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
40 lines (40 loc) · 1.25 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: cpp-linter-lib/tests/capture_tools_output/cpp-linter/cpp-linter/test_git_lib.patch
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-added-large-files
args: [--maxkb=9000]
- id: check-yaml
- id: check-toml
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.8
hooks:
# Run the python linter.
- id: ruff
args: [ --fix ]
# Run the python formatter.
- id: ruff-format
- repo: local
# these hooks require a tools managed by the rustup installer
hooks:
# Run the rust formatter.
# Run the rust linter.
- id: cargo-clippy
name: cargo clippy
description: Lint all rust files with the clippy tool
entry: cargo clippy --allow-staged --allow-dirty --fix
language: rust
pass_filenames: false
- id: cargo-fmt
name: cargo fmt
description: Format all rust files with the rustfmt tool
entry: cargo fmt
language: rust
pass_filenames: false