-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1939efc
commit a33cf05
Showing
6 changed files
with
166 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Code-QA | ||
|
||
on: push | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8.18 | ||
architecture: x64 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install deps | ||
run: | | ||
pip install mypy==1.8.0 pylint==3.2.5 ruff==0.1.14 remotivelabs-broker>=0.1.8 pytest | ||
- name: Run lint | ||
run: | | ||
cd python | ||
make | ||
cd - |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
*.iml | ||
*.iml | ||
.venv |
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 @@ | ||
3.8 |
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,100 @@ | ||
[tool.ruff] | ||
line-length = 140 | ||
indent-width = 4 | ||
exclude = [ | ||
'.bzr', | ||
'.direnv', | ||
'.eggs', | ||
'.git', | ||
'.git-rewrite', | ||
'.hg', | ||
'.ipynb_checkpoints', | ||
'.mypy_cache', | ||
'.nox', | ||
'.pants.d', | ||
'.pyenv', | ||
'.pytest_cache', | ||
'.pytype', | ||
'.ruff_cache', | ||
'.svn', | ||
'.tox', | ||
'.venv', | ||
'.vscode', | ||
'__pypackages__', | ||
'_build', | ||
'buck-out', | ||
'build', | ||
'dist', | ||
'node_modules', | ||
'site-packages', | ||
'venv', | ||
'deps', | ||
'binaries', | ||
'__pycache__' | ||
] | ||
[tool.ruff.lint] | ||
select = ['C901', 'E', 'W', 'F', 'RET505', 'I001', 'B034', 'EXE001', 'N', 'UP032', 'FA'] | ||
ignore = [] | ||
mccabe = { max-complexity = 14 } | ||
|
||
[tool.ruff.format] | ||
quote-style = "double" | ||
indent-style = "space" | ||
skip-magic-trailing-comma = false | ||
|
||
[tool.pylint] | ||
ignore=[ | ||
'.bzr', | ||
'.direnv', | ||
'.eggs', | ||
'.git', | ||
'.git-rewrite', | ||
'.hg', | ||
'.ipynb_checkpoints', | ||
'.mypy_cache', | ||
'.nox', | ||
'.pants.d', | ||
'.pyenv', | ||
'.pytest_cache', | ||
'.pytype', | ||
'.ruff_cache', | ||
'.svn', | ||
'.tox', | ||
'.venv', | ||
'.vscode', | ||
'__pypackages__', | ||
'_build', | ||
'buck-out', | ||
'build', | ||
'dist', | ||
'node_modules', | ||
'site-packages', | ||
'venv', | ||
'deps', | ||
'binaries', | ||
'__pycache__' | ||
] | ||
recursive=true | ||
|
||
[tool.pylint.format] | ||
max-line-length=140 | ||
max-module-lines=1000 | ||
|
||
[tool.pylint.messages_control] | ||
disable=['wrong-import-order', | ||
'missing-module-docstring', | ||
'missing-class-docstring', | ||
'missing-function-docstring', | ||
'duplicate-code'] | ||
|
||
[tool.mypy] | ||
strict = true | ||
allow_untyped_calls = true | ||
check_untyped_defs = true | ||
warn_return_any = true | ||
warn_unused_ignores = true | ||
show_error_codes = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = "someip.*" | ||
ignore_missing_imports = true |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.pyc | ||
__pycache__ | ||
.venv | ||
__pycache__ |
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,38 @@ | ||
MAKEFLAGS += -j4 -O | ||
.DEFAULT_GOAL := lint | ||
|
||
.PHONY: lint | ||
lint: pylint mypy ruff-format ruff | ||
|
||
.PHONY: pylint | ||
pylint: | ||
pylint . | ||
@echo "" | ||
|
||
.PHONY: mypy | ||
mypy: | ||
mypy . --config-file ../pyproject.toml --no-namespace-packages | ||
@echo "" | ||
|
||
.PHONY: ruff-format | ||
ruff-format: | ||
ruff format --check --diff | ||
@echo "" | ||
|
||
.PHONY: ruff | ||
ruff: | ||
ruff check | ||
@echo "" | ||
|
||
.PHONY: lint-fix | ||
fix: ruff-fix ruff-format-fix | ||
|
||
.PHONY: ruff-fix | ||
ruff-fix: | ||
ruff check --fix | ||
@echo "" | ||
|
||
.PHONY: ruff-format-fix | ||
ruff-format-fix: | ||
ruff format | ||
@echo "" |