From 5d2840449aaec5c579949ed1f00c1d92e6083caf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 16:31:04 +0100 Subject: [PATCH] Use Cockpit's shared static code checks These will soon take over ESLint and stylelint, plus they also cover ruff and other goodies for the Python part. This supersedes the explicit ruff call. This is already being used by cockpit-{podman,machines,navigator} etc. --- Makefile | 4 ++++ test/run | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a8d1ab2..cc3a7ad 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ all: $(DIST_TEST) COCKPIT_REPO_FILES = \ pkg/lib \ test/common \ + test/static-code \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git @@ -178,6 +179,9 @@ prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common check: prepare-check test/common/run-tests ${RUN_TESTS_OPTIONS} +codecheck: test/static-code $(NODE_MODULES_TEST) + test/static-code + # checkout Cockpit's bots for standard test VM images and API to launch them bots: $(COCKPIT_REPO_STAMP) test/common/make-bots diff --git a/test/run b/test/run index 576d364..1b9cfab 100755 --- a/test/run +++ b/test/run @@ -11,6 +11,5 @@ export RUN_TESTS_OPTIONS=--track-naughties # linters are off by default for production builds, but we want to run them in CI export LINT=1 +make codecheck make check - -ruff check test/check*