scripts: ci: Add ruff configuration files
Add a baseline toml file for current rule violations, and a default configuration file. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
4db97b5bb6
commit
973eaff5a2
2 changed files with 2463 additions and 0 deletions
2432
.ruff-excludes.toml
Normal file
2432
.ruff-excludes.toml
Normal file
File diff suppressed because it is too large
Load diff
31
.ruff.toml
Normal file
31
.ruff.toml
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Copyright (c) 2024 Basalte bv
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
extend = ".ruff-excludes.toml"
|
||||
|
||||
line-length = 100
|
||||
target-version = "py310"
|
||||
|
||||
[lint]
|
||||
select = [
|
||||
# zephyr-keep-sorted-start
|
||||
"B", # flake8-bugbear
|
||||
"E", # pycodestyle
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"SIM", # flake8-simplify
|
||||
"UP", # pyupgrade
|
||||
"W", # pycodestyle warnings
|
||||
# zephyr-keep-sorted-stop
|
||||
]
|
||||
|
||||
ignore = [
|
||||
# zephyr-keep-sorted-start
|
||||
"SIM108", # Allow if-else blocks instead of forcing ternary operator
|
||||
"UP027", # deprecated pyupgrade rule
|
||||
# zephyr-keep-sorted-stop
|
||||
]
|
||||
|
||||
[format]
|
||||
quote-style = "preserve"
|
||||
line-ending = "lf"
|
Loading…
Add table
Add a link
Reference in a new issue