Review Request 128591: error location fix

Anton Anikin anton.anikin at htower.ru
Wed Aug 3 16:34:28 UTC 2016



> On Aug. 3, 2016, 11:17 a.m., Kevin Funk wrote:
> > Looks good to me.
> > 
> > Care to add a test in tests/test_cppcheckparser.cpp? Should be super trivial.

OK, the test is ready.


- Anton


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128591/#review98045
-----------------------------------------------------------


On Aug. 3, 2016, 11:15 a.m., Anton Anikin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128591/
> -----------------------------------------------------------
> 
> (Updated Aug. 3, 2016, 11:15 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-cppcheck
> 
> 
> Description
> -------
> 
> Let some test.cpp file contain such code:
> 
> int x = 0; // line 100
> 
> .... // lines, which don't use the value of 'x' variable
> 
> x = 10; // line 120
> 
> Then cppcheck will produce such XML output:
> 
> <error id="redundantAssignment" ... >
>     <location file="test.cpp" line="120"/>
>     <location file="test.cpp" line="100"/>
> </error>
> 
> Old code set error location to line 100 of test.cpp (last <location> element), but it's wrong behaviour - error position must be at line 120. Current (new) version uses only first <location> element of the <error> item for getting information about error position.
> 
> 
> Diffs
> -----
> 
>   parsers/cppcheckparser.cpp aad0dca 
> 
> Diff: https://git.reviewboard.kde.org/r/128591/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Anton Anikin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160803/8957cd25/attachment.html>


More information about the KDevelop-devel mailing list