Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
BUILDTYPE ?= Release
PYTHON ?= python3
RUFF ?= tools/pip/site-packages/bin/ruff
YAMLLINT ?= tools/pip/site-packages/bin/yamllint
DESTDIR ?=
SIGN ?=
PREFIX ?= /usr/local
Expand Down Expand Up @@ -1719,14 +1720,15 @@ lint-yaml-build: ## Build resources needed to lint YAML files.
$(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages yamllint

.PHONY: lint-yaml
ifneq ("","$(wildcard $(YAMLLINT))")
lint-yaml: ## Lint the YAML files with yamllint.
@if [ -d "tools/pip/site-packages/yamllint" ]; then \
$(info Running YAML linter...) \
PYTHONPATH=tools/pip $(PYTHON) -m yamllint .; \
else \
echo 'YAML linting with yamllint is not available'; \
echo "Run 'make lint-yaml-build'"; \
fi
$(info Running YAML linter...)
PYTHONPATH=tools/pip $(YAMLLINT) .
else
lint-yaml:
$(warning YAML linting with yamllint is not available)
$(warning Run 'make lint-yaml-build')
endif

.PHONY: lint
.PHONY: lint-ci
Expand Down
8 changes: 8 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ pkgs.mkShell {
RUFF = pkgs.lib.getExe ruff;
}
)
// (
let
yamllint = pkgs.lib.lists.findFirst (p: p.meta.mainProgram == "yamllint") null devTools;
in
pkgs.lib.optionalAttrs (yamllint != null) {
YAMLLINT = pkgs.lib.getExe yamllint;
}
)
// pkgs.lib.optionalAttrs (!withSQLite) {
NOSQLITE = "1";
}
Expand Down
1 change: 1 addition & 0 deletions tools/nix/devTools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
pkgs.jq
pkgs.ruff
pkgs.shellcheck
pkgs.yamllint
]
++ (
if (ncu-path == null) then
Expand Down
Loading