| 51 | } |
| 52 | |
| 53 | void 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 | |
| 69 | bool ProblemModel::problemExists(KDevelop::IProblem::Ptr newProblem) |
| 70 | { |
nothing calls this directly
no test coverage detected