Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEG: Add git pre-commit configuration #1173

Merged
merged 19 commits into from
Sep 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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/
hoechenberger marked this conversation as resolved.
Show resolved Hide resolved

# 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
hoechenberger marked this conversation as resolved.
Show resolved Hide resolved
# D103: missing docstring in public function
# D400: docstring first line must end with period
args: ["--ignore=D103,D400"]
files: ^tutorials/|^examples/
hoechenberger marked this conversation as resolved.
Show resolved Hide resolved

# 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]