Skip to content

Commit 70396c3

Browse files
committed
lint: add pre-commit config to verify with linter and formatter
1 parent e56ca3c commit 70396c3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.11.8
4+
hooks:
5+
# Run the linter.
6+
- id: ruff
7+
args: [ --fix ]
8+
# Run the formatter.
9+
- id: ruff-format

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
python310 # Minimum supported python version in this project
2323
uv
2424
ruff
25+
pre-commit
2526
];
27+
28+
shellHook = ''
29+
pre-commit install
30+
'';
2631
};
2732

2833
formatter = pkgs.nixfmt-rfc-style;

0 commit comments

Comments
 (0)