forked from modular/modular-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
51 lines (51 loc) · 1.62 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: trailing-whitespace
- id: check-merge-conflict
- id: mixed-line-ending
- repo: local
hooks:
# ensure pixi environments are up to date
# workaround for https://github.com/prefix-dev/pixi/issues/1482
- id: pixi-install
name: Make sure pixi envs are up to date
entry: pixi install
language: system
always_run: true
require_serial: true
pass_filenames: false
- id: actionlint
name: Lint GitHub Actions workflow files
language: system
entry: pixi run actionlint
types: [yaml]
files: ^\.github/workflows/
- id: check-jsonschema
name: Check rattler recipes
language: system
entry: pixi run check-jsonschema --schemafile https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json
files: ^[^/]+/recipe.yaml$
types: [yaml]
- id: typecheck-python
name: typecheck-python
entry: pixi run mypy
language: system
types_or: [python, pyi]
pass_filenames: false
# Use ruff for python examples
- id: ruff
name: ruff
entry: pixi run ruff check --fix --exit-non-zero-on-fix --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
- id: ruff-format
name: ruff-format
entry: pixi run ruff format --force-exclude
language: system
types_or: [python, pyi]
require_serial: true