2020-05-27 20:00:14 -07:00
|
|
|
repos:
|
2022-01-13 14:19:38 -08:00
|
|
|
- repo: meta
|
|
|
|
|
hooks:
|
|
|
|
|
- id: check-hooks-apply
|
|
|
|
|
- id: check-useless-excludes
|
2020-05-27 20:00:14 -07:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2023-04-13 21:45:12 -07:00
|
|
|
rev: v4.4.0
|
2020-05-27 20:00:14 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: check-ast
|
2022-12-31 21:00:50 -08:00
|
|
|
exclude: '^(third_party)/'
|
2020-05-27 20:00:14 -07:00
|
|
|
- id: check-json
|
2023-04-13 21:45:12 -07:00
|
|
|
- id: check-toml
|
2020-05-27 20:00:14 -07:00
|
|
|
- id: check-xml
|
|
|
|
|
- id: check-yaml
|
2020-06-03 12:54:49 -07:00
|
|
|
- id: check-merge-conflict
|
|
|
|
|
- id: check-symlinks
|
2022-01-12 22:52:58 -08:00
|
|
|
- id: check-added-large-files
|
|
|
|
|
args: ['--maxkb=100']
|
2022-08-30 11:20:55 -07:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2023-06-20 10:41:21 -07:00
|
|
|
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
|
2023-08-05 07:15:35 -07:00
|
|
|
- -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
|
2022-09-27 20:43:05 -07:00
|
|
|
- repo: local
|
2020-05-28 15:05:04 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: mypy
|
2022-09-27 20:43:05 -07:00
|
|
|
name: mypy
|
|
|
|
|
entry: mypy
|
|
|
|
|
language: system
|
|
|
|
|
types: [python]
|
2023-07-21 18:36:51 -07:00
|
|
|
args: ['--explicit-package-bases']
|
2022-12-31 21:00:50 -08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
|
2020-05-28 17:45:22 -07:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2023-08-01 12:32:21 -07:00
|
|
|
rev: 6.1.0
|
2020-05-27 20:33:05 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: flake8
|
2022-12-31 21:00:50 -08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(selfdrive/debug/)/'
|
2022-01-13 14:19:38 -08:00
|
|
|
additional_dependencies: ['flake8-no-implicit-concat']
|
2020-05-27 20:33:05 -07:00
|
|
|
args:
|
2022-01-13 14:19:38 -08:00
|
|
|
- --indent-size=2
|
|
|
|
|
- --enable-extensions=NIC
|
2021-08-22 00:27:48 -07:00
|
|
|
- --select=F,E112,E113,E304,E502,E701,E702,E703,E71,E72,E731,W191,W6
|
2020-05-30 20:14:58 -07:00
|
|
|
- --statistics
|
2022-01-13 14:19:38 -08:00
|
|
|
- -j4
|
2020-05-27 20:00:14 -07:00
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: pylint
|
|
|
|
|
name: pylint
|
|
|
|
|
entry: pylint
|
|
|
|
|
language: system
|
|
|
|
|
types: [python]
|
2022-12-31 21:00:50 -08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)'
|
2022-08-30 15:10:52 -07:00
|
|
|
args:
|
2022-10-16 15:54:36 -07:00
|
|
|
- -j0
|
2022-08-30 15:10:52 -07:00
|
|
|
- -rn
|
|
|
|
|
- -sn
|
|
|
|
|
- --rcfile=.pylintrc
|
2020-06-19 20:39:34 -07:00
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: cppcheck
|
|
|
|
|
name: cppcheck
|
|
|
|
|
entry: cppcheck
|
|
|
|
|
language: system
|
|
|
|
|
types: [c++]
|
2022-12-31 21: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-19 20:39:34 -07:00
|
|
|
args:
|
|
|
|
|
- --error-exitcode=1
|
2020-07-22 12:10:45 +02:00
|
|
|
- --language=c++
|
2020-06-19 20:39:34 -07:00
|
|
|
- --quiet
|
|
|
|
|
- --force
|
|
|
|
|
- -j8
|
2022-10-03 12:26:12 -07:00
|
|
|
- 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
|
2023-05-23 11:09:40 -07:00
|
|
|
rev: '1.5.0'
|
2022-10-21 16:23:56 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: poetry-check
|
2023-05-27 04:21:34 +02:00
|
|
|
- id: poetry-lock
|
|
|
|
|
name: validate poetry lock
|
|
|
|
|
args:
|
|
|
|
|
- --check
|