Commit 0573bcc4 authored by Joe Lawrence's avatar Joe Lawrence Committed by Josh Poimboeuf
Browse files

livepatch/klp-build: add Makefile with check target



Add a standalone Makefile with a 'check' target that runs static code
analysis (shellcheck) on the klp-build script(s).  This is intended
strictly as a development aid.

Acked-by: default avatarSong Liu <song@kernel.org>
Signed-off-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
Link: https://patch.msgid.link/20260310203751.1479229-7-joe.lawrence@redhat.com


Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
parent e4dbf706
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# Standalone Makefile for developer tooling (not part of kbuild).

SHELLCHECK := $(shell which shellcheck 2> /dev/null)

SRCS := \
  klp-build

.DEFAULT_GOAL := help
.PHONY: help
help:
	@echo "  check      - Run shellcheck on $(SRCS)"
	@echo "  help       - Show this help message"

.PHONY: check
check:
ifndef SHELLCHECK
	$(error shellcheck is not installed. Please install it to run checks)
endif
	@$(SHELLCHECK) $(SHELLCHECK_OPTIONS) $(SRCS)