Skip to content

Commit 66a8d04

Browse files
taimoorzaeemsteve-chavez
authored andcommitted
nix: setup linter to lint python files
This sets up the `ruff` linter for python code linting. Signed-off-by: Taimoor Zaeem <[email protected]>
1 parent 8e35d54 commit 66a8d04

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nix/tools/style.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
, hsie
99
, nixpkgs-fmt
1010
, python3Packages
11+
, ruff
1112
, silver-searcher
1213
, statix
1314
, stylish-haskell
@@ -64,10 +65,14 @@ let
6465
echo "Scanning nix files for unused code..."
6566
${deadnix}/bin/deadnix -f
6667
68+
# ruff has gaps in scanning for unused code, so we use vulture
6769
echo "Scanning python files for unused code..."
6870
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?py$' . \
6971
| xargs ${python3Packages.vulture}/bin/vulture --exclude docs/conf.py
7072
73+
echo "Linting python files..."
74+
${ruff}/bin/ruff check .
75+
7176
echo "Checking consistency of import aliases in Haskell code..."
7277
${hsie} check-aliases main src
7378

0 commit comments

Comments
 (0)