forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge branch 'master' into PA-dev"
- Loading branch information
1 parent
41a2120
commit f982546
Showing
32 changed files
with
475 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: 'set up pre-commit environment' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: ./.github/workflows/auto-cache | ||
with: | ||
path: .ci_cache/pre-commit | ||
key: pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} | ||
restore-keys: | | ||
pre-commit- | ||
save: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
exclude: '^(tinygrad_repo)' | ||
repos: | ||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-ast | ||
exclude: '^(third_party)/' | ||
- id: check-json | ||
exclude: '.devcontainer/devcontainer.json|.vscode/' # these support JSON with comments | ||
- id: check-toml | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-added-large-files | ||
exclude: '(docs/CARS.md)|(uv.lock)|(third_party/acados/include/blasfeo/include/blasfeo_d_kernel.h)' | ||
args: | ||
- --maxkb=120 | ||
- --enforce-all | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
exclude: '^(third_party/)|(body/)|(msgq/)|(panda/)|(opendbc/)|(rednose/)|(rednose_repo/)|(teleoprtc/)|(teleoprtc_repo/)|(selfdrive/ui/translations/.*.ts)|(uv.lock)' | ||
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,bumb,nd,sie,preints,whit,indexIn | ||
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.5 | ||
hooks: | ||
- id: ruff | ||
exclude: '^(third_party/)|(msgq/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)' | ||
- repo: local | ||
hooks: | ||
- id: mypy | ||
name: mypy | ||
entry: mypy | ||
language: system | ||
types: [python] | ||
args: | ||
- --local-partial-types | ||
- --explicit-package-bases | ||
exclude: '^(third_party/)|(body/)|(msgq/)|(opendbc/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)' | ||
- repo: local | ||
hooks: | ||
- id: cppcheck | ||
name: cppcheck | ||
entry: cppcheck | ||
language: system | ||
types: [c++] | ||
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)' | ||
args: | ||
- --error-exitcode=1 | ||
- --language=c++ | ||
- --quiet | ||
- --force | ||
- -j8 | ||
- --library=qt | ||
- --include=third_party/kaitai/kaitaistream.h | ||
- repo: https://github.com/cpplint/cpplint | ||
rev: 1.6.1 | ||
hooks: | ||
- id: cpplint | ||
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)' | ||
args: | ||
- --quiet | ||
- --counting=total | ||
- --linelength=240 | ||
# https://google.github.io/styleguide/cppguide.html | ||
# relevant rules are whitelisted, see all options with: cpplint --filter= | ||
- --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/comma,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+whitespace/tab,+readability/braces | ||
- repo: https://github.com/MarcoGorelli/cython-lint | ||
rev: v0.16.2 | ||
hooks: | ||
- id: cython-lint | ||
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)' | ||
args: | ||
- --max-line-length=240 | ||
- --ignore=E111, E302, E305 | ||
- repo: local | ||
hooks: | ||
- id: test_translations | ||
name: test translations | ||
entry: pytest selfdrive/ui/tests/test_translations.py | ||
language: system | ||
pass_filenames: false | ||
files: '^selfdrive/ui/translations/' | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.29.1 | ||
hooks: | ||
- id: check-github-workflows | ||
- repo: local | ||
hooks: | ||
- id: import-linter | ||
name: import linter | ||
entry: lint-imports | ||
language: system | ||
pass_filenames: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ pytest | |
cd system/loggerd && pytest . | ||
|
||
# run the linter | ||
op lint | ||
pre-commit run --all | ||
``` | ||
|
||
## Testing | ||
|
Submodule opendbc_repo
deleted from
a40652
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pip install --upgrade pyupgrade | ||
|
||
git ls-files '*.py' | grep -v 'third_party/' | xargs pyupgrade --py311-plus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.