It seems non existing files are silently ignored if a least one source file is found. Reproduce: touch a.cpp cppcheck a.cpp missing.cpp echo $? Result: 0 Expected behavior: some error message like cppcheck: error: could not find 'missing.cpp' However this produce an error message as expected: cppcheck missing.cpp cppcheck: error: could not find or open any of the paths given. Thus if at least one source file is found all not existing other source files are silently ignored.