mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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: Song Liu <song@kernel.org> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> Link: https://patch.msgid.link/20260310203751.1479229-7-joe.lawrence@redhat.com Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
This commit is contained in:
parent
e4dbf70615
commit
0573bcc4ff
20
scripts/livepatch/Makefile
Normal file
20
scripts/livepatch/Makefile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# 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)
|
||||
Loading…
Reference in New Issue
Block a user