Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
67 lines (61 loc) · 1.77 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
67 lines (61 loc) · 1.77 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Run with prek (`uvx prek run --all-files`) or pre-commit.
#
# This repo is mostly MATLAB. The vendored MATLAB toolboxes and binary files
# below are never touched by any hook, so third-party code stays byte-identical.
exclude: |
(?x)^(
mym-mariadbconn/|
modDataJoint/|
GHToolbox/|
compareVersions/|
dirwalk/|
@RecordingProcessJobGUI/|
PythonScripts/__pycache__/|
.*\.(mat|mlapp|fig|p|png|ico|pyc|prj)$
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v6.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
# Enviblenv.yml is a legacy conda env file with inconsistent indentation
# that is not valid YAML; left as is.
- id: check-yaml
exclude: ^Enviblenv\.yml$
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
# tests/ holds MATLAB suites (TestFoo.m) next to the pytest files, so
# name-tests-test is limited to Python files.
- id: name-tests-test
args: ["--pytest-test-first"]
files: ^(tests|PythonScripts/tests)/.*\.py$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.16.10"
hooks:
- id: ruff-check
types_or: [python, pyi]
args: ["--fix", "--show-fixes"]
- id: ruff-format
types_or: [python, pyi]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.30.1
hooks:
- id: zizmor
- repo: https://github.com/astral-sh/uv-pre-commit
rev: "0.12.22"
hooks:
- id: uv-lock
- repo: https://github.com/abravalheri/validate-pyproject
rev: "0.26"
hooks:
- id: validate-pyproject