MCPcopy Create free account
hub / github.com/KDE/kdevelop / fixProblemFinalLocation

Method fixProblemFinalLocation

plugins/cppcheck/problemmodel.cpp:53–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void ProblemModel::fixProblemFinalLocation(KDevelop::IProblem::Ptr problem)
54{
55 // Fix problems with incorrect range, which produced by cppcheck's errors
56 // without <location> element. In this case location automatically gets "/".
57 // To avoid this we set current analysis path as problem location.
58
59 if (problem->finalLocation().document.isEmpty()) {
60 problem->setFinalLocation(m_pathLocation);
61 }
62
63 const auto& diagnostics = problem->diagnostics();
64 for (auto& diagnostic : diagnostics) {
65 fixProblemFinalLocation(diagnostic);
66 }
67}
68
69bool ProblemModel::problemExists(KDevelop::IProblem::Ptr newProblem)
70{

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.45
finalLocationMethod · 0.45
setFinalLocationMethod · 0.45
diagnosticsMethod · 0.45

Tested by

no test coverage detected