-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
51 lines (50 loc) · 2.06 KB
/
.pre-commit-config.yaml
File metadata and controls
51 lines (50 loc) · 2.06 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
49
50
51
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace # trims trailing whitespace
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- id: mixed-line-ending # replaces or checks mixed line ending
- id: check-symlinks # checks for symlinks which do not point to anything
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems
# Git
- id: check-merge-conflict # checks for files that contain merge conflict strings
# Python
- id: check-docstring-first # checks a common error of defining a docstring after code
- id: debug-statements # checks for debugger imports and py37+ `breakpoint()` calls in python source
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.15.6'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
args: ['--config=./light-curve/pyproject.toml', './light-curve']
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
language: rust
entry: cargo fmt --manifest-path=light-curve/Cargo.toml
files: \.rs
pass_filenames: false
- id: cargo-clippy-fix
name: cargo clippy fix
language: rust
entry: cargo clippy --manifest-path=light-curve/Cargo.toml --all-targets --fix --allow-dirty --allow-staged
files: \.rs
pass_filenames: false
- id: cargo-clippy-check
name: cargo clippy check
language: rust
entry: cargo clippy --manifest-path=light-curve/Cargo.toml --all-targets -- -D warnings
files: \.rs
pass_filenames: false
# pre-commit.ci settings
# Skip clippy, because it tries to download dependencies which doesn't work at CI
ci:
skip: [cargo-clippy-fix, cargo-clippy-check]