-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
64 lines (64 loc) · 1.69 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
repos:
#####
# Basic file cleanliness
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
#####
# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
# Sort imports
- id: ruff
args: ['check', '--select', 'I', '--fix']
# Run the linter
- id: ruff
args: ['--line-length', '79']
# Run the formatter
- id: ruff-format
args: ['--line-length', '79']
#####
# R
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3
hooks:
- id: style-files
- id: lintr
#####
# Java
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
hooks:
- id: pretty-format-java
args: [--aosp,--autofix]
#####
# Julia
# Due to lack of first-class Julia support, this needs Julia local install
# and JuliaFormatter.jl installed in the library
# - repo: https://github.com/domluna/JuliaFormatter.jl
# rev: v1.0.39
# hooks:
# - id: julia-formatter
#####
# Secrets
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: package.lock.json
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
args: ["--verbose", "--"]
- id: clippy
# Use 'all-targets' to run on all code, including tests and examples
args: ["--all-targets", "--", "-D", "warnings", "-W", "clippy::pedantic", "-A", "clippy::module-name-repetitions"]