-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
86 lines (83 loc) · 2.59 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# pre-commit configuration file
#
# TL;DR
# pre-commit runs a series of formatters and linters on every commit.
# If throws an error, it's usually already fixed the problem and just
# wants you to have a look at the changes it made.
# This file sets up pre-commit to do some basic checks, fix whitespace
# and line endings, and run stylish-haskell.
# To setup the pre-commit hooks, you'll need pre-commit, and install the
# hooks by running `pre-commit install` from the repository root.
#
# See: https://pre-commit.com
# Exclude golden standard generated JSON files:
exclude: '^.*\.golden$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: destroyed-symlinks
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: fix-byte-order-marker
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/ikamensh/flynt/
rev: "1.0.1"
hooks:
- id: flynt
- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: "24.4.2"
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.1"
hooks:
- id: mypy
name: mypy (vehicle-python)
args:
- "--config-file=vehicle-python/pyproject.toml"
additional_dependencies:
- "types_setuptools >=45"
- "types_pygments >=2.14"
- "packaging >=23"
files: '^vehicle-python\/.*\.py$'
- repo: https://github.com/citation-file-format/cffconvert
rev: "054bda51dbe278b3e86f27c890e3f3ac877d616c"
hooks:
- id: validate-cff
- repo: local
hooks:
- id: cabal-fmt
name: "format cabal with cabal-fmt"
entry: ./scripts/cabal-fmt
language: script
types: [file, text]
files: ^.*\.cabal$
args: [--check, --inplace]
- id: ormolu
name: "format haskell with ormolu"
entry: ./scripts/ormolu
language: script
types: [haskell]
args: [--mode inplace, --check-idempotence]
# Do not run local hooks on pre-commit CI:
ci:
skip: [cabal-fmt, ormolu]