Skip to content

Commit 014012a

Browse files
committed
cppcheck: improve documentation of --use-host-cppcheck
... to make it clear that the option requires statically linked cppcheck installed on the host. Resolves: #117 Closes: #194
1 parent f6fb009 commit 014012a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

py/plugins/cppcheck.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def enable(self):
4545
def init_parser(self, parser):
4646
parser.add_argument(
4747
"--use-host-cppcheck", action="store_true",
48-
help="use host's Cppcheck instead of the one in chroot \
48+
help="use statically linked cppcheck installed on the host \
4949
(automatically enables the Cppcheck plug-in)")
5050

5151
parser.add_argument(
@@ -103,6 +103,8 @@ def store_cppcheck_version_hook(results, mock):
103103
cmd = mock.get_mock_cmd(["--chroot", "cppcheck --version"])
104104
(ec, verstr) = results.get_cmd_output(cmd, shell=False)
105105
if ec != 0:
106+
if self.use_host_cppcheck:
107+
results.error("--use-host-cppcheck expects statically linked cppcheck installed on the host", ec=0)
106108
results.error("failed to query cppcheck version", ec=ec)
107109
return ec
108110

0 commit comments

Comments
 (0)