Bug 384082

Summary: cppcheck is checking CMake generated files
Product: [Applications] kdevelop Reporter: kbrea
Component: Analyzer: CppcheckAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 5.1.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.2.2
Sentry Crash Report:

Description kbrea 2017-08-27 17:36:29 UTC
When using cppcheck to analyse the whole project (Analyse -> Cppcheck (Whole Project) it tries to analyse c and cpp files generated by CMake. These are located in the build folder, in my case under build/CMakeFiles/.

Solution:
Ignore the build folder completely.

Right now I sadly don't have time to get KDevelop to compile and make my own merge request, but this could be fixed by simply changing line 240 of the parameters.cpp from
result << checkPath;
to
result << "-ibuild" << checkPath;
Comment 1 Anton Anikin 2018-03-05 06:57:29 UTC
Git commit db0d8027749ba8c94702981ccb3062fa6c6006eb by Anton Anikin.
Committed on 05/03/2018 at 06:54.
Pushed by antonanikin into branch '5.2'.

Fix bug 384082 - cppcheck is checking CMake generated files

Summary:
The patch removes cmake generated directory from cppcheck analysis.

Test Plan: Works as expected

Reviewers: #kdevelop, kfunk

Reviewed By: #kdevelop, kfunk

Subscribers: kdevelop-devel

Differential Revision: https://phabricator.kde.org/D11041

M  +7    -0    plugins/cppcheck/parameters.cpp

https://commits.kde.org/kdevelop/db0d8027749ba8c94702981ccb3062fa6c6006eb