[kdev-cppcheck] code refactor; many fixes and improvements;
AbandonedPublic

Authored by antonanikin on Sep 23 2016, 7:30 AM.

Details

Reviewers
kfunk
Group Reviewers
KDevelop
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.
  1. 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.
  1. 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).
  1. Incremental populating of ProblemView during check - therefore parser was fixed for incremental parsing.
  1. 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.
  1. Per-project results. Now we can open several projects, run checks for them and results will be "switched" together with active document.
  1. Check menu for projects items - we can check selected item (file, directory, etc.)
  1. 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.
  1. 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

  1. 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.

Diff Detail

Repository
R61 KDevelop: CppCheck Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
antonanikin updated this revision to Diff 6892.Sep 23 2016, 7:30 AM
antonanikin retitled this revision from to [kdev-cppcheck] code refactor; many fixes and improvements;.
antonanikin updated this object.
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added reviewers: kfunk, KDevelop.
antonanikin set the repository for this revision to R61 KDevelop: CppCheck Integration.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptSep 23 2016, 7:30 AM
antonanikin added a comment.EditedSep 23 2016, 7:34 AM

Global settings:

Project settings (1):

Project settings (2):

Project settings (3):

antonanikin updated this revision to Diff 6893.Sep 23 2016, 7:44 AM

Fix font (to monospace) in command line text view (project config page).

antonanikin planned changes to this revision.Oct 11 2016, 6:23 AM
antonanikin abandoned this revision.Oct 18 2016, 3:09 AM