Skip to content

Conversation

@firewave
Copy link
Collaborator

No description provided.

@firewave firewave force-pushed the ainfo-err-x2 branch 9 times, most recently from b6e7ae6 to 1653983 Compare January 30, 2026 12:28
@firewave
Copy link
Collaborator Author

The files.txt errorhandling cannot be tested because because the files is being rewritten on each start-up. The listed XMLs are also read beforehand so any issues introduced to them are caught in earlier code.

This is to catch issues with generating this data during run-time. This is done since we do not (can) use the XML library to write it. I need to modify that data after it has already been written to inject the unmatchedSuppression warnings (at least in my current approach) to fix the remaining issues with them when using a builddir.

@firewave
Copy link
Collaborator Author

This exposes an issue with --clang and --cppcheck-build-dir:

FAILED test/cli/clang-import_test.py::test_cmd_std_c_builddir - assert "nofile:0:0: error: '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/test.a1' from '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/files.txt' not found [internalError]\n\n" == ''
  
  + nofile:0:0: error: '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/test.a1' from '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/files.txt' not found [internalError]
  +

I filed https://trac.cppcheck.net/ticket/14456 about this.

@firewave firewave force-pushed the ainfo-err-x2 branch 3 times, most recently from d5c3b7f to 5b83c1c Compare January 31, 2026 09:34
@firewave
Copy link
Collaborator Author

This exposes an issue with --clang and --cppcheck-build-dir:

FAILED test/cli/clang-import_test.py::test_cmd_std_c_builddir - assert "nofile:0:0: error: '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/test.a1' from '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/files.txt' not found [internalError]\n\n" == ''
  
  + nofile:0:0: error: '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/test.a1' from '/tmp/pytest-of-runner/pytest-0/popen-gw0/test_cmd_std_c_builddir0/b1/files.txt' not found [internalError]
  +

I filed https://trac.cppcheck.net/ticket/14456 about this.

This issue is not limited to --clang - I disabled the bailout in question.

Comment on lines 267 to 272
if (error == tinyxml2::XML_ERROR_FILE_NOT_FOUND) {
// TODO: bailout?
//return "'" + xmlfile + "' from '" + filesTxt + "' not found";
continue;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were bailing out here before and thus might have skipping any subsequent files. It would be better if we have a test which triggers this and add a test before merging this.

@firewave firewave force-pushed the ainfo-err-x2 branch 2 times, most recently from 593357a to 4519cbb Compare January 31, 2026 10:25
@firewave
Copy link
Collaborator Author

firewave commented Jan 31, 2026

This issue is not limited to --clang - I disabled the bailout in question.

There are various causes for this including the one with --clang (e.g. #8175).

@firewave firewave force-pushed the ainfo-err-x2 branch 2 times, most recently from 1684c9a to 1fa361a Compare January 31, 2026 11:06
…provided by the user

the filename is never handed out and thus the file is never created
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant