[Differential] [Request, 2,466 lines] D2844: [kdev-cppcheck] code refactor; many fixes and improvements;
antonanikin (Anton Anikin)
noreply at phabricator.kde.org
Fri Sep 23 07:30:38 UTC 2016
antonanikin created this revision.
antonanikin added reviewers: kfunk, KDevelop.
antonanikin set the repository for this revision to rKDEVCPPCHECK KDevelop CppCheck.
Restricted Application added a subscriber: kdevelop-devel.
Sorry for huge patch.
This patch produce many fixes and improvements for kdev-cppcheck plugin.
1. KConfig fixes. Now all settings are handles with standard `kcfg_some_widget` way, old version use them only for "global" config page.
2. UI improvements for config pages - many common parameters can be easley configured from GUI. Resulting command line are builded and showed in "real time", which allows easily check correctnes of settings.
3. UI improvement for checking process - now cppcheck's output hided by default and user immediately see ProblemsView with finded errors. This behavior is configurable and we also can enable XML-output displaying (for plugin debug, for example).
4. Incremental populating of ProblemView during check - therefore parser was fixed for incremental parsing.
5. Reordered menus. Now we have submenus "Analyse current file with" and "Analyse current project with" in "Run" main menu and editor context menu. This is useful for following populating such submenus with other analyzer plugins. Created actions disabled (or hided) during running check and for "non-projects" files.
6. Per-project results. Now we can open several projects, run checks for them and results will be "switched" together with active document.
7. Check menu for projects items - we can check selected item (file, directory, etc.)
8. Include directories for project automatically imported to cppcheck parameters and user can also enable "global" includes (/usr/include/...) used in project. It is possible to "block" some includes from command line.
9. For "hand defined" parameters it is possible to use placeholders:
`%p` - Gets replaced by the URL of the project's root directory.
`%b` - Gets replaced by the URL of the project's build directory.
It is useful for define (or block) include directories for example: `%p/some_dir`
10. Workaround for Qt-based projects - plugin automatically find value of `Q_MOC_OUTPUT_REVISION` define. If such define is not correctly set, cppcheck 'fails' on files with moc-includes and not return any errors, even if the file contains them.
Tested on `master` KDevelop and kdevplatform with a lot of different code.
rKDEVCPPCHECK KDevelop CppCheck
To: antonanikin, kfunk, #kdevelop
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel