Skip to content

Commit 29b3a3b

Browse files
committed
Add cppcheck environment variables
1 parent 5a791a9 commit 29b3a3b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/make/common.mk

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ MARKDOWN_LINTER ?= remark
130130
# Define the linter to use when linting shell script files:
131131
SHELL_LINTER ?= shellcheck
132132

133+
# Define the linter to use when linting C files:
134+
C_LINTER ?= cppcheck
135+
133136

134137
# COMMANDS #
135138

@@ -564,3 +567,15 @@ DEPS_SHELLCHECK_BUILD_OUT ?= $(DEPS_BUILD_DIR)/shellcheck_$(deps_shellcheck_vers
564567

565568
# Host platform:
566569
DEPS_SHELLCHECK_PLATFORM := $(shell command -v $(NODE) >/dev/null 2>&1 && $(NODE_HOST_PLATFORM))
570+
571+
# Define the cppcheck version:
572+
DEPS_CPPCHECK_VERSION ?= 2.5
573+
574+
# Generate a version slug:
575+
deps_cppcheck_version_slug := $(subst .,_,$(DEPS_CPPCHECK_VERSION))
576+
577+
# Define the output path when building cppcheck:
578+
DEPS_CPPCHECK_BUILD_OUT ?= $(DEPS_BUILD_DIR)/cppcheck_$(deps_cppcheck_version_slug)
579+
580+
# Host platform:
581+
DEPS_CPPCHECK_PLATFORM := $(shell command -v $(NODE) >/dev/null 2>&1 && $(NODE_HOST_PLATFORM))

0 commit comments

Comments
 (0)