mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
ci: Lint workflow (shellcheck, ruff, qmllint) and make lint
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f2682f802
commit
bc66eb2416
4 files changed
+78
-2
No files matched your search
@@ -4,16 +4,25 @@ SH := steamify.sh $(wildcard lib/*.sh) ui/steamify-app.sh .github/tools/bundle.s
|
||||
DEV ?= ../steamify-cachyos-dev
|
||||
TESTS := $(wildcard $(DEV)/tests/*-test.sh)
|
||||
|
||||
.PHONY: check syntax lint test bundle fmt-check
|
||||
.PHONY: check syntax lint lint-sh lint-py lint-qml test bundle fmt-check
|
||||
check: syntax lint test bundle
|
||||
|
||||
syntax:
|
||||
@for f in $(SH); do bash -n "$$f" || exit 1; done
|
||||
python3 -c 'import ast, sys; [ast.parse(open(f).read(), f) for f in sys.argv[1:]]' ui/steamify-ui patches/*.py
|
||||
|
||||
lint:
|
||||
lint: lint-sh lint-py lint-qml
|
||||
|
||||
lint-sh:
|
||||
@command -v shellcheck >/dev/null && shellcheck -S warning $(SH) || echo "shellcheck not installed: skipped"
|
||||
|
||||
lint-py:
|
||||
@command -v ruff >/dev/null && ruff check ui/steamify-ui patches || echo "ruff not installed: skipped"
|
||||
|
||||
lint-qml:
|
||||
@Q="$$(command -v qmllint6 || command -v qmllint || ls /usr/lib/qt6/bin/qmllint 2>/dev/null)"; \
|
||||
[ -n "$$Q" ] && "$$Q" --unqualified disable --max-warnings 0 ui/qml/*.qml || echo "qmllint not installed: skipped"
|
||||
|
||||
test:
|
||||
@for t in $(TESTS); do echo "== $$t"; REPO="$(CURDIR)" bash "$$t" || exit 1; done
|
||||
|
||||
|
||||
Reference in new issue
Block a user