DOKK / manpages / debian 11 / zmk-doc / zmk.Coverity.5.en
zmk.Coverity(5) File Formats Manual (prm) zmk.Coverity(5)

CoverityModule for interacting with Coverity static analysis tool

include z.mk
# additional definitions required
$(eval $(call ZMK.Import,Coverity))

The module Coverity allows preparing and uploading scan artifacts to a hosted coverity instance.

This module provides the following targets.

This phony target uses curl to upload the archived scan artifacts to the coverity scanning service.

This phony target removes the cov-int directory as well as the cov-int.$(NAME)-$(VERSION).tar.gz archive.

This target invokes the cov-build program to forcibly re-build the whole project and collect information for analysis.

This target archives the cov-int directory.

This module provides the following variables.

List of source files to consider as analysis dependency.

There is no default value. This variable must be set before importing the module.

Name of the project registered on the Coverity instance

There is no default value. This variable must be set before importing the module.

E-mail address of the project maintainer, as registered on the Coverity instance.

There is no default value. This variable must be set before importing the module.

The token used to authorize uploads of scan artifacts.

There is no default value. This variable must be set before importing the module.

The URL used for submitting scan artifacts.

The default value is

This module uses recursive make invocation and is therefore not safe to execute concurrently with other scanners that use this strategy.

The following example shows how Coverity can be used to scan a sample project. The code assumes that local installation of coverity scanner is in . The project name, maintainer email are provided in-line but the authentication token is expected to be provided through the environment variable COVERITY_TOKEN.

include z.mk
COVERITY_TOKEN ?=
ifneq (,$(COVERITY_TOKEN))  # enable coverity if secret token is available
Coverity.Sources=foo.c
Coverity.ProjectName=foo
Coverity.Email=maintainer@example.com
Coverity.Token=$(COVERITY_TOKEN)
cov-int: PATH := $(PATH):/opt/cov-analysis-linux64-2019.03/bin
$(eval $(call ZMK.Import,Coverity))
endif

The Coverity module first appeared in zmk 0.1

Zygmunt Krynicki <me@zygoon.pl>

Jan 8 2021 zmk 0.5.1