leemoa / cppcheclipse

Automatically exported from code.google.com/p/cppcheclipse
0 stars 0 forks source link

Errors in headers are marked on checked files only #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a checked resource (like test.c) include a header (test.h) with a
error detected by cppcheck
2. Launch checking on test.c
3. Problem marker is set on the checked resource not on the header (but
with the location of the header)

What is the expected output? What do you see instead?
As in the error tag in the results (see console), the file is correct, the
marker should be set on the header.

What version of the product are you using? On what operating system?
cppcheclipse 0.9.2, cppcheck 1.38, eclipse 3.5.1 + cdt 6.0.1

Please provide any additional information below.
In the xml structure on error stream, file tag contain the full path to the
header. The ProblemReporter class seems to look for the file if it is not
the one checked... so I don't know if this issue is specific to my
configuration or universal...

Original issue reported on code.google.com by mathieu....@gmail.com on 2 Nov 2009 at 4:50

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for reporting this, it is indeed a bug within cppcheclipse. I will fix 
this
with the next version.

Original comment by konra...@gmx.de on 2 Nov 2009 at 5:10

GoogleCodeExporter commented 9 years ago
Even if it's not totally linked to this issue, I would like to suggest an 
enhancement
of using cppcheck about headers.
In the recent version of cppcheck, it is possible to indicate include 
directories, as
header includes are resolved by default in the local folder (-I parameter). 
Could it
be possible to add a list of directory to use at each execution of cppcheck in 
global
preference, or in specific preference (project, folder or even file maybe... - 
even
if I don't know if it's possible to attach such preference in substructure of a
project) ?
This feature could then suppress some false positives like memory leaks...

Otherwise your plug-in is very useful, I'm working on a large project (~ 7k 
files)
somewhat very old (approaching it's 20th anniversary !!!) and chasing syntax 
error is
becoming very important. Thanks for your work, I hope my different issue 
reporting or
suggestion may help this project development.

Original comment by mathieu....@gmail.com on 12 Nov 2009 at 12:32

GoogleCodeExporter commented 9 years ago
Due to Issue 878 in cppcheck 
(http://sourceforge.net/apps/trac/cppcheck/ticket/878),
it is in the current version of cppcheclipse not possible to automatically pass 
the
include directories to cppcheck anymore. As soon as this is resolved, I will 
enable
that option again. Giving additional manual include paths shouldn't be 
necessary,
since the include paths can be correctly extracted from the CDT.

Original comment by konra...@gmx.de on 14 Nov 2009 at 2:20

GoogleCodeExporter commented 9 years ago
I also enhanced cppcheclipse so that since version 0.9.3 you can give arbitrary
command line arguments. You can set these via the project properties. They can 
be
used as workaround as long as the include bug is open or for other 
sophisticated or
even undocumented arguments.

Original comment by konra...@gmx.de on 21 Nov 2009 at 6:22

GoogleCodeExporter commented 9 years ago

Original comment by konra...@gmx.de on 22 Nov 2009 at 6:30