1zmk.Coverity(5) Programmer's Manual zmk.Coverity(5)
2
4 Coverity — Module for interacting with Coverity static analysis tool
5
7 include z.mk
8 # additional definitions required
9 $(eval $(call ZMK.Import,Coverity))
10
12 The module Coverity allows preparing and uploading scan artifacts to a
13 hosted coverity instance.
14
16 This module provides the following targets.
17
18 upload-coverity-scan
19 This phony target uses curl to upload the archived scan artifacts to the
20 coverity scanning service.
21
22 clean
23 This phony target removes the cov-int directory as well as the
24 cov-int.$(NAME)-$(VERSION).tar.gz archive.
25
26 cov-int
27 This target invokes the cov-build program to forcibly re-build the whole
28 project and collect information for analysis.
29
30 cov-int.$(NAME)-$(VERSION).tar.gz
31 This target archives the cov-int directory.
32
34 This module provides the following variables.
35
36 Coverity.Sources
37 List of source files to consider as analysis dependency.
38
39 There is no default value. This variable must be set before importing the
40 module.
41
42 Coverity.ProjectName
43 Name of the project registered on the Coverity instance
44
45 There is no default value. This variable must be set before importing the
46 module.
47
48 Coverity.Email
49 E-mail address of the project maintainer, as registered on the Coverity
50 instance.
51
52 There is no default value. This variable must be set before importing the
53 module.
54
55 Coverity.Token
56 The token used to authorize uploads of scan artifacts.
57
58 There is no default value. This variable must be set before importing the
59 module.
60
61 Coverity.ScanURL
62 The URL used for submitting scan artifacts.
63
64 The default value is https://scan.coverity.com/builds
65
67 This module uses recursive make invocation and is therefore not safe to
68 execute concurrently with other scanners that use this strategy.
69
71 The following example shows how Coverity can be used to scan a sample
72 project. The code assumes that local installation of coverity scanner is
73 in /opt/cov-analysis-linux64-2019.03. The project name, maintainer email
74 are provided in-line but the authentication token is expected to be pro‐
75 vided through the environment variable COVERITY_TOKEN.
76
77 include z.mk
78 COVERITY_TOKEN ?=
79 ifneq (,$(COVERITY_TOKEN)) # enable coverity if secret token is available
80 Coverity.Sources=foo.c
81 Coverity.ProjectName=foo
82 Coverity.Email=maintainer@example.com
83 Coverity.Token=$(COVERITY_TOKEN)
84 cov-int: PATH := $(PATH):/opt/cov-analysis-linux64-2019.03/bin
85 $(eval $(call ZMK.Import,Coverity))
86 endif
87
89 The Coverity module first appeared in zmk 0.1
90
92 Zygmunt Krynicki <me@zygoon.pl>
93
94zmk 0.5 Jan 8 2021 zmk 0.5