daca@home: If cppcheck binary does not handle --unsafe-exitcode then execute without it [ci skip] (#5773)

This commit is contained in:
Daniel Marjamäki 2023-12-17 16:33:00 +01:00 committed by GitHub
parent 150ca20404
commit e7d0bb0009
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -457,6 +457,8 @@ def scan_package(cppcheck_path, source_path, libraries, capture_callstack=True):
cppcheck_cmd = os.path.join(cppcheck_path, 'cppcheck') + ' ' + options_rp
cmd = nice_cmd + ' ' + cppcheck_cmd + ' ' + __jobs + ' ' + dir_to_scan
returncode, stdout, stderr, elapsed_time = __run_command(cmd)
if returncode >= 1 and ('--unsafe-exitcode' in stdout):
returncode, stdout, stderr, elapsed_time = __run_command(cmd.replace(' --unsafe-exitcode', ''))
# collect messages
information_messages_list = []