gicho / cppcheclipse

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

File not included in the Problems pane #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install cppcheck v1.59 from source
2. Install cppcheck plugin for Eclipse
3. Configure plugin to use the file
4. check a project

What is the expected output?
Items detected, printed in console, captured to Problems pane with file and 
line #

What do you see instead??
Items detected, printed in console, captured to Problems pane, missing the file 
name, but with the line # (so it is not possible to click on a problem to view 
it.)

What version of the cppcheclipse, cppcheck, Eclipse and Java are you using?
Cppcheck 1.59
cppcheclipse 0.9.9
Eclipse: Rational Team Concert
Version: 4.0
Build id: RTC-I20120612-0919

On what operating system?
SLED 10.2 x86-64

Please provide any additional information below.
This does not happen with a trivial project. It may be an issue with projects 
under Jazz source control, or it may be an issue when the sandbox directory is 
not the same as the workspace directory.

Original issue reported on code.google.com by david.ha...@aeroflex.com on 26 Apr 2013 at 2:34

Attachments:

GoogleCodeExporter commented 8 years ago
we've got the same problem. do you find any solutions?

Original comment by lfar...@lfarkas.org on 10 Jun 2013 at 12:51

GoogleCodeExporter commented 8 years ago
Not yet, but I haven't really had time to pursue it more.
Are you also using a different directory for the workspace vs. the sandbox?

Original comment by david.ha...@aeroflex.com on 10 Jun 2013 at 1:05

GoogleCodeExporter commented 8 years ago
In the console log provided above I only see two errors

src/RCI/arch/linux/common/NormalError.cpp;13;style;unusedFunction;The function 
'InitLibraryLoader' is never used.
;;information;missingInclude;Cppcheck cannot find all the include files (use 
--check-config for details)
The first one should appear on the correct file. The latter one is generic and 
therefore only appears on the project level. Can you try to provide an example 
workspace, where this error occurs?

Original comment by konra...@gmx.de on 10 Jun 2013 at 1:21

GoogleCodeExporter commented 8 years ago
The first error does NOT show the file in the plug-in - that's rather the point 
of this bug.

I've not had the time to try to trivialize this issue, but my suspicion is that 
the plug-in is assuming the code resides under the workspace directory. In this 
case, the Eclipse workspace directory is different from the source code sandbox 
directory (to keep the version control system from considering all the Eclipse 
control files).

My conjecture is that the plug-in does not handle the case where the sandbox 
and the workspace are different.

Original comment by david.ha...@aeroflex.com on 10 Jun 2013 at 1:25

GoogleCodeExporter commented 8 years ago
The first error is not file related. Please open a bug report at cppcheck 
(http://sourceforge.net/apps/trac/cppcheck), if you want to have a different 
behaviour here. Even with the CLI you will never have a dedicated filename for 
this error. You see exactly the output of the CLI in the console, and you see 
that the filename is not visible here.

Original comment by konra...@gmx.de on 10 Jun 2013 at 1:28

GoogleCodeExporter commented 8 years ago
WHAT? HOW is this invalid?

cppcheck is correctly emitting the file name of the error 
(src/RCI/arch/linux/common/NormalError.cpp).

The plug in does NOT show that file, or allow the error as shown in the plug-in 
to access the file.

How is that cppcheck's fault? cppcheck is emitting the file name, it is the 
plug-in that is not acting on that name!

Original comment by david.ha...@aeroflex.com on 10 Jun 2013 at 2:22