File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33BUILDTYPE ?= Release
44PYTHON ?= python3
5+ RUFF ?= tools/pip/site-packages/bin/ruff
56DESTDIR ?=
67SIGN ?=
78PREFIX ?= /usr/local
@@ -1694,15 +1695,15 @@ lint-py-build: ## Build resources needed to lint python files.
16941695 $(PYTHON ) -m pip install --upgrade --system --target tools/pip/site-packages ruff==0.13.1
16951696
16961697.PHONY : lint-py lint-py-fix lint-py-fix-unsafe
1697- ifneq ("","$(wildcard tools/pip/site-packages/ruff ) ")
1698+ ifneq ("","$(wildcard $( RUFF ) ) ")
16981699# Lint the Python code with ruff.
16991700lint-py :
17001701 $(info Running Python linter...)
1701- tools/pip/site-packages/bin/ruff check .
1702+ $( RUFF ) check .
17021703lint-py-fix :
1703- tools/pip/site-packages/bin/ruff check . --fix
1704+ $( RUFF ) check . --fix
17041705lint-py-fix-unsafe :
1705- tools/pip/site-packages/bin/ruff check . --fix --unsafe-fixes
1706+ $( RUFF ) check . --fix --unsafe-fixes
17061707else
17071708lint-py lint-py-fix lint-py-fix-unsafe :
17081709 $(warning Python linting with ruff is not available)
Original file line number Diff line number Diff line change @@ -141,6 +141,14 @@ pkgs.mkShell {
141141 )
142142 ) ;
143143 }
144+ // (
145+ let
146+ ruff = pkgs . lib . lists . findFirst ( p : p . meta . mainProgram == "ruff" ) null devTools ;
147+ in
148+ pkgs . lib . optionalAttrs ( ruff != null ) {
149+ RUFF = pkgs . lib . getExe ruff ;
150+ }
151+ )
144152 // pkgs . lib . optionalAttrs ( ! withSQLite ) {
145153 NOSQLITE = "1" ;
146154 }
Original file line number Diff line number Diff line change 77 pkgs . gh
88 pkgs . git
99 pkgs . jq
10+ pkgs . ruff
1011 pkgs . shellcheck
1112]
1213++ (
You can’t perform that action at this time.
0 commit comments