Files
sunnypilot/.pre-commit-config.yaml

91 lines
3.0 KiB
YAML
Raw Normal View History

repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
exclude: '^(third_party)/'
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
2020-06-03 12:54:49 -07:00
- id: check-merge-conflict
- id: check-symlinks
- id: check-added-large-files
args: ['--maxkb=100']
2022-08-30 11:20:55 -07:00
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
2022-08-30 11:20:55 -07:00
hooks:
- id: codespell
2023-02-14 14:32:08 -08:00
exclude: '^(third_party/)|(body/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)|(selfdrive/ui/translations/.*.ts)|(poetry.lock)'
2022-08-30 11:20:55 -07:00
args:
# if you've got a short variable name that's getting flagged, add it here
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup
2022-08-30 11:20:55 -07:00
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
2023-07-21 18:36:51 -07:00
args: ['--explicit-package-bases']
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
2020-05-27 20:33:05 -07:00
hooks:
- id: flake8
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(selfdrive/debug/)/'
additional_dependencies: ['flake8-no-implicit-concat']
2020-05-27 20:33:05 -07:00
args:
- --indent-size=2
- --enable-extensions=NIC
- --select=F,E112,E113,E304,E502,E701,E702,E703,E71,E72,E731,W191,W6
- --statistics
- -j4
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)'
2022-08-30 15:10:52 -07:00
args:
- -j0
2022-08-30 15:10:52 -07:00
- -rn
- -sn
- --rcfile=.pylintrc
- repo: local
hooks:
- id: cppcheck
name: cppcheck
entry: cppcheck
language: system
types: [c++]
exclude: '^(third_party/)|(cereal/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)'
args:
- --error-exitcode=1
2020-07-22 12:10:45 +02:00
- --language=c++
- --quiet
- --force
- -j8
- repo: local
hooks:
- id: test_translations
name: test translations
entry: selfdrive/ui/tests/test_translations.py
language: script
pass_filenames: false
2022-10-21 16:23:56 -07:00
- repo: https://github.com/python-poetry/poetry
rev: '1.5.0'
2022-10-21 16:23:56 -07:00
hooks:
- id: poetry-check
- id: poetry-lock
name: validate poetry lock
args:
- --check