[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.
REVISION SUMMARY
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.
TEST PLAN
Tested on `master` KDevelop and kdevplatform with a lot of different code.
REPOSITORY
rKDEVCPPCHECK KDevelop CppCheck
REVISION DETAIL
https://phabricator.kde.org/D2844
AFFECTED FILES
CMakeLists.txt
config/cppcheckconfig.kcfg
config/cppcheckconfig.kcfgc
config/cppcheckpreferences.cpp
config/cppcheckpreferences.h
config/genericconfigpage.cpp
config/genericconfigpage.h
config/globalconfigpage.cpp
config/globalconfigpage.h
config/globalconfigpage.ui
config/globalsettings.kcfg
config/globalsettings.kcfgc
config/projectconfigpage.cpp
config/projectconfigpage.h
config/projectconfigpage.ui
config/projectsettings.kcfg
config/projectsettings.kcfgc
config/ui/cppchecksettings.ui
config/ui/genericconfig.ui
debug.h
job.cpp
job.h
kdevcppcheck.json
kdevcppcheck.rc
parameters.cpp
parameters.h
parser.cpp
parser.h
parsers/cppcheckparser.cpp
parsers/cppcheckparser.h
plugin.cpp
plugin.h
tests/CMakeLists.txt
tests/test_cppcheckjob.cpp
tests/test_cppcheckjob.h
tests/test_cppcheckparser.cpp
tests/test_cppcheckparser.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: antonanikin, kfunk, #kdevelop
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160923/483d0bef/attachment.html>
More information about the KDevelop-devel
mailing list