2020-05-28 11:00:14 +08:00
|
|
|
repos:
|
2022-01-14 06:19:38 +08:00
|
|
|
- repo: meta
|
|
|
|
hooks:
|
|
|
|
- id: check-hooks-apply
|
|
|
|
- id: check-useless-excludes
|
2020-05-28 11:00:14 +08:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2023-04-14 12:45:12 +08:00
|
|
|
rev: v4.4.0
|
2020-05-28 11:00:14 +08:00
|
|
|
hooks:
|
|
|
|
- id: check-ast
|
2023-01-01 13:00:50 +08:00
|
|
|
exclude: '^(third_party)/'
|
2020-05-28 11:00:14 +08:00
|
|
|
- id: check-json
|
2023-04-14 12:45:12 +08:00
|
|
|
- id: check-toml
|
2020-05-28 11:00:14 +08:00
|
|
|
- id: check-xml
|
|
|
|
- id: check-yaml
|
2020-06-04 03:54:49 +08:00
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: check-symlinks
|
2022-01-13 14:52:58 +08:00
|
|
|
- id: check-added-large-files
|
|
|
|
args: ['--maxkb=100']
|
2022-08-31 02:20:55 +08:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2023-06-21 01:41:21 +08:00
|
|
|
rev: v2.2.5
|
2022-08-31 02:20:55 +08:00
|
|
|
hooks:
|
|
|
|
- id: codespell
|
2023-02-15 06: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-31 02:20:55 +08:00
|
|
|
args:
|
|
|
|
# if you've got a short variable name that's getting flagged, add it here
|
2023-08-09 05:12:51 +08:00
|
|
|
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie
|
2022-08-31 02:20:55 +08:00
|
|
|
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US
|
2022-09-28 11:43:05 +08:00
|
|
|
- repo: local
|
2020-05-29 06:05:04 +08:00
|
|
|
hooks:
|
|
|
|
- id: mypy
|
2022-09-28 11:43:05 +08:00
|
|
|
name: mypy
|
|
|
|
entry: mypy
|
|
|
|
language: system
|
|
|
|
types: [python]
|
2023-07-22 09:36:51 +08:00
|
|
|
args: ['--explicit-package-bases']
|
2023-01-01 13:00:50 +08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
|
2023-08-09 04:41:30 +08:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
|
|
rev: v0.0.282
|
2020-05-28 11:33:05 +08:00
|
|
|
hooks:
|
2023-08-09 04:41:30 +08:00
|
|
|
- id: ruff
|
|
|
|
exclude: '^(third_party/)|(cereal/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)|(tinygrad_repo/)'
|
2020-06-20 11:39:34 +08:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: cppcheck
|
|
|
|
name: cppcheck
|
|
|
|
entry: cppcheck
|
|
|
|
language: system
|
|
|
|
types: [c++]
|
2023-01-01 13:00:50 +08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)'
|
2020-06-20 11:39:34 +08:00
|
|
|
args:
|
|
|
|
- --error-exitcode=1
|
2020-07-22 18:10:45 +08:00
|
|
|
- --language=c++
|
2020-06-20 11:39:34 +08:00
|
|
|
- --quiet
|
|
|
|
- --force
|
|
|
|
- -j8
|
2022-10-04 03:26:12 +08:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: test_translations
|
|
|
|
name: test translations
|
|
|
|
entry: selfdrive/ui/tests/test_translations.py
|
|
|
|
language: script
|
|
|
|
pass_filenames: false
|
2022-10-22 07:23:56 +08:00
|
|
|
- repo: https://github.com/python-poetry/poetry
|
2023-05-24 02:09:40 +08:00
|
|
|
rev: '1.5.0'
|
2022-10-22 07:23:56 +08:00
|
|
|
hooks:
|
|
|
|
- id: poetry-check
|
2023-05-27 10:21:34 +08:00
|
|
|
- id: poetry-lock
|
|
|
|
name: validate poetry lock
|
|
|
|
args:
|
|
|
|
- --check
|