Skip to content

Commit

Permalink
Add git pre-commit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hoechenberger committed Sep 26, 2023
1 parent 2de8536 commit b5c8d51
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
repos:
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
args: [--quiet]

# Ruff mne
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
hooks:
- id: ruff
name: ruff mne
files: ^mne/

# Ruff tutorials and examples
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
hooks:
- id: ruff
name: ruff tutorials and examples
# D103: missing docstring in public function
# D400: docstring first line must end with period
args: ["--ignore=D103,D400"]
files: ^tutorials/|^examples/

# Codespell
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies:
- tomli
files: ^mne/|^doc/|^examples/|^tutorials/
types_or: [python, bib, rst, inc]

# yamllint
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
hooks:
- id: yamllint
args: [--strict, -c, .yamllint.yml]

0 comments on commit b5c8d51

Please sign in to comment.