Skip to content

Commit

Permalink
cppcheck: improve documentation of --use-host-cppcheck
Browse files Browse the repository at this point in the history
... to make it clear that the option requires statically linked cppcheck
installed on the host.

Resolves: #117
Closes: #194
  • Loading branch information
kdudka committed Nov 8, 2024
1 parent f6fb009 commit 014012a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion py/plugins/cppcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def enable(self):
def init_parser(self, parser):
parser.add_argument(
"--use-host-cppcheck", action="store_true",
help="use host's Cppcheck instead of the one in chroot \
help="use statically linked cppcheck installed on the host \
(automatically enables the Cppcheck plug-in)")

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

Expand Down

0 comments on commit 014012a

Please sign in to comment.