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-04-14 12:45:12 +08:00
|
|
|
rev: v2.2.4
|
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
|
|
|
|
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup
|
|
|
|
- --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-01-01 13:00:50 +08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
|
2020-05-29 08:45:22 +08:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2023-04-14 12:45:12 +08:00
|
|
|
rev: 6.0.0
|
2020-05-28 11:33:05 +08:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
2023-01-01 13:00:50 +08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(selfdrive/debug/)/'
|
2022-01-14 06:19:38 +08:00
|
|
|
additional_dependencies: ['flake8-no-implicit-concat']
|
2020-05-28 11:33:05 +08:00
|
|
|
args:
|
2022-01-14 06:19:38 +08:00
|
|
|
- --indent-size=2
|
|
|
|
- --enable-extensions=NIC
|
2021-08-22 15:27:48 +08:00
|
|
|
- --select=F,E112,E113,E304,E502,E701,E702,E703,E71,E72,E731,W191,W6
|
2020-05-31 11:14:58 +08:00
|
|
|
- --statistics
|
2022-01-14 06:19:38 +08:00
|
|
|
- -j4
|
2020-05-28 11:00:14 +08:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: pylint
|
|
|
|
name: pylint
|
|
|
|
entry: pylint
|
|
|
|
language: system
|
|
|
|
types: [python]
|
2023-01-01 13:00:50 +08:00
|
|
|
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)'
|
2022-08-31 06:10:52 +08:00
|
|
|
args:
|
2022-10-17 06:54:36 +08:00
|
|
|
- -j0
|
2022-08-31 06:10:52 +08:00
|
|
|
- -rn
|
|
|
|
- -sn
|
|
|
|
- --rcfile=.pylintrc
|
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
|