-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
48 lines (44 loc) · 1.24 KB
/
.pre-commit-config.yaml
File metadata and controls
48 lines (44 loc) · 1.24 KB
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
41
42
43
44
45
46
47
48
# Pre-commit configuration for Polytorus
# Install pre-commit: pip install pre-commit
# Setup hooks: pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Rust formatting
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
name: Rust fmt
description: Format Rust code with rustfmt
entry: cargo fmt
language: system
files: \.rs$
args: ['--all', '--']
- id: clippy
name: Rust clippy
description: Lint Rust code with clippy
entry: cargo clippy
language: system
files: \.rs$
args: ['--lib', '--', '-D', 'warnings']
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
args: ['--maxkb=1000']
# Security checks
- repo: local
hooks:
- id: cargo-audit
name: Cargo audit
description: Check for security vulnerabilities
entry: cargo audit
language: system
files: Cargo\.(toml|lock)$
pass_filenames: false