Skip to content

Commit

Permalink
Added ruff ADR
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogsilva committed Feb 22, 2024
1 parent 5dd73f3 commit 80ab47b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/decisions/0002-use-ruff-for-linting-and-formatting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use ruff for Python code linting and formatting

## Context and Problem Statement

We want to ensure committed code is checked for common errors and is formatted with a standard style. Given the
number of alternatives that currently exist and the project requirements, which would be an appropriate choice?


## Considered Options

* [ruff](https://docs.astral.sh/ruff/)
* [flake8](https://flake8.pycqa.org/en/latest/) + [black](https://black.readthedocs.io/en/stable/index.html)


## Decision Outcome

Chosen option: "ruff", because it does both linting and formatting, supports all relevant features of the
"flake8 + black" option and is fast to operate

### Consequences

* Good, because it is easy to install and setup
* Good, because it is fast to execute
* Good, because it is configurable
* Good, because it contains a large number of built-in rules

0 comments on commit 80ab47b

Please sign in to comment.