Fix bug 375557 "No indication of cppcheck being run in background"
ClosedPublic

Authored by antonanikin on Feb 27 2017, 7:37 AM.

Details

Summary

Bug description:
After clicking Analyze -> Cppcheck (Current Project), the Cppcheck tool view opens, but it's empty and does not say that analysis is in progress which is very misleading.

The fix adds notification messages to Problems View:

  1. At the start of analysis: "Analysis started..." This message will be removed with first problem report.
  1. At the end of analysis (if we doesn't have any problems): "Analysis completed, no problems detected."

For both messages we set current analysis path as problem location.

BUG: 375274

Test Plan

Tested with master branch

Diff Detail

Repository
R32 KDevelop
Branch
arcpatch-D4816
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2062
Build 2080: arc lint + arc unit
antonanikin created this revision.Feb 27 2017, 7:37 AM
kfunk requested changes to this revision.Feb 27 2017, 5:50 PM
kfunk added a subscriber: kfunk.

Hmm, IMO this fix is at the wrong layer. There should probably be some kind of API in ProblemModel in kdevplatform dealing with progress information which accomodates this issue instead. Maybe a KDevelop::ProblemModel::setPlaceHolderText?

This revision now requires changes to proceed.Feb 27 2017, 5:50 PM
kfunk added inline comments.Feb 27 2017, 5:50 PM
analyzers/cppcheck/problemmodel.cpp
108 ↗(On Diff #11879)

Pretty hacky IMO

Hmm, IMO this fix is at the wrong layer. There should probably be some kind of API in ProblemModel in kdevplatform dealing with progress information which accomodates this issue instead. Maybe a KDevelop::ProblemModel::setPlaceHolderText?

I thought about it, but we need also make some other changes in KDevelop::ProblemModel for this, in particular API for creating custom problems (with overloaded source() and sourceString() methods).

Ok, I will try to provide common API for such cases in next revision.

antonanikin updated this revision to Diff 12048.Mar 2 2017, 6:05 AM
antonanikin edited edge metadata.
  • Use new ProblemModel::setPlaceHolderText() method

New version requires D4883 and D4884 applied to kdevplatform.

mwolff requested changes to this revision.Mar 5 2017, 7:42 PM
mwolff added a subscriber: mwolff.
mwolff added inline comments.
analyzers/cppcheck/problemmodel.cpp
139 ↗(On Diff #12048)

as said in the other review: the placeholder should be set once, and then get displayed whenever the model is empty.

also reword the message to make it less funny, and remove the parens:

Analysis of %1 started...
140 ↗(On Diff #12048)

both times passing QString(), as I said in the other report - this argument should be removed

141 ↗(On Diff #12048)

I also don't get why we want to pass the location

This revision now requires changes to proceed.Mar 5 2017, 7:42 PM
antonanikin planned changes to this revision.Mar 6 2017, 2:52 AM
antonanikin edited edge metadata.
  • Update to new version
  • Small cleanup
  • Simplify code a bit
mwolff accepted this revision.Mar 19 2017, 12:58 PM

we need to wait for the other change to get in first of course

kfunk added a comment.Jul 10 2017, 9:58 PM

Bump. What's missing here, Anton?

This revision now requires changes to proceed.Jul 10 2017, 9:58 PM

Update to master

antonanikin planned changes to this revision.Feb 10 2018, 8:57 AM
  • Simplify code, rebase to master
kfunk accepted this revision.Aug 21 2018, 8:25 AM

+1 (with some minor nitpicks)

plugins/cppcheck/problemmodel.cpp
155

Tooltips have no title-capitalization.

-> "Re-run last Cppcheck analysis"

This revision is now accepted and ready to land.Aug 21 2018, 8:25 AM

Tooltips have no title-capitalization.

Ok, will be fixed.

Push this into 5.3?

  • Capitalization fix
antonanikin marked an inline comment as done.Aug 21 2018, 8:31 AM
antonanikin edited the summary of this revision. (Show Details)Aug 21 2018, 8:38 AM
This revision was automatically updated to reflect the committed changes.