Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cppcheck to v2.10 #33510

Closed
thomashampson opened this issue Feb 8, 2022 · 6 comments · Fixed by #35810
Closed

Update cppcheck to v2.10 #33510

thomashampson opened this issue Feb 8, 2022 · 6 comments · Fixed by #35810
Assignees
Labels
ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS Maintenance Unassigned issues to be addressed in the next maintenance period.
Milestone

Comments

@thomashampson
Copy link
Contributor

thomashampson commented Feb 8, 2022

Cppcheck should be updated so we can benefit from improvements. Needs to be updated on the Jenkins builders and in the conda developer .yml files. Also need to update suppressions list if required.

@thomashampson thomashampson added Maintenance Unassigned issues to be addressed in the next maintenance period. ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS labels Feb 8, 2022
@thomashampson thomashampson added this to the Release 6.4 S1 milestone Feb 8, 2022
@thomashampson thomashampson removed the Maintenance Unassigned issues to be addressed in the next maintenance period. label Feb 10, 2022
@thomashampson thomashampson self-assigned this Feb 14, 2022
@thomashampson thomashampson changed the title Update cppcheck to v2.6 Update cppcheck to v2.7 Feb 18, 2022
@thomashampson thomashampson changed the title Update cppcheck to v2.7 Update cppcheck to v2.6 Feb 18, 2022
@thomashampson
Copy link
Contributor Author

thomashampson commented Mar 8, 2022

2.6.2, 2.6.3 and 2.7 all have internal cppcheck errors, e.g.:

</error>
<error id="cppcheckError" severity="error" msg="Internal error: Child process crashed with signal 11" verbose="Internal error: Child process crashed with signal 11">
    <location file="/mantid_src/Framework/DataObjects/src/MDBoxSaveable.cpp " line="0" column="0"/>
</error>

@thomashampson
Copy link
Contributor Author

try 2.7.2

@thomashampson
Copy link
Contributor Author

2.7.5 fails to work:
#### ThreadExecutor::handleRead error, type was:i

Also, oddly it prints out -- cppcheck version: 2.7.4 near the start.

There are still internal cppcheck errors in thisd version too.

@martyngigg martyngigg modified the milestones: Release 6.5, Release 6.6 Oct 20, 2022
@sf1919
Copy link
Contributor

sf1919 commented Feb 16, 2023

We need to be on v2.6 or higher to upgrade pygments (e.g. https://github.com/mantidproject/mantid/blob/main/mantid-developer-win.yml#L52). We need to update pygments in order to upgrade Sphinx (#34584)

@thomashampson
Copy link
Contributor Author

We can try v2.10 now that it's on conda-forge

@thomashampson thomashampson changed the title Update cppcheck to v2.6 Update cppcheck to v2.10 Mar 22, 2023
@thomashampson thomashampson added the Maintenance Unassigned issues to be addressed in the next maintenance period. label Jun 19, 2023
@thomashampson
Copy link
Contributor Author

Suggestion from Martyn:
For the cppcheck issue with the test files one option might be to add a custom target that just generates the test files and doesn't compile them. Using add_custom_target (https://cmake.org/cmake/help/latest/command/add_custom_target.html) with DEPENDS and the list of cpp files in https://github.com/mantidproject/mantid/blob/main/buildconfig/CMake/FindCxxTest.cmake#L130 would mean you could make the cppcheck cmake target depend on these targets so it will generate the sources first and then run cppcheck without having to compile the tests too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants