Coder Social home page Coder Social logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Please give me the directory with the sources, otherwise I can't reproduce the 
error. Probably one file is enough (Config.cpp or TestClass.cpp). Thanks

Original comment by [email protected] on 15 Dec 2011 at 10:59

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Hi!

I've modified the files somewhat, but it's still the same. Running them
from command line with
cppcheck --all --style --unused-functions .
generates the following:

Checking ./utils/Config.cpp...
[./utils/Config.cpp:23]: (style) Member variable not initialized in the
constructor 'Config::a'
[./utils/Config.h:31]: (style) Unused private function
'Config::parseDocument'
Checking usage of global functions..

Running from eclipse generates nothing.

Original comment by [email protected] on 15 Dec 2011 at 1:22

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Please attach that file here.

Original comment by [email protected] on 15 Dec 2011 at 7:59

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024

Original comment by [email protected] on 16 Dec 2011 at 7:58

Attachments:

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
When I execute cppcheck (1.52) from within Eclipse I see the following output 
in the Eclipse console:

== Running cppcheck at 26.12.11 13:27 ==
Command line: /usr/local/cppcheck/cppcheck-1.52/cppcheck --template 
{file};{line};{severity};{id};{message} --enable=all src/Config.cpp
src/Config.cpp;3;warning;uninitVar;Member variable 'Config::a' is not 
initialized in the constructor.
src/Config.h;11;style;unusedPrivateFunction;Unused private function 
'Config::parseDocument'
Checking src/Config.cpp...
Checking usage of global functions..
Duration 110 ms.

Also the warning markers are correctly added to the sources. It is the same 
output as directly on the command line. 
Please give the output from the Eclipse console when running cppcheck from 
Eclipse.

Original comment by [email protected] on 26 Dec 2011 at 12:30

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Output from Eclipse console:

== Running cppcheck at 1/3/12 10:20 AM ==
Command line: /home/user/install/eclipse/dropins/cppcheck-1.52/cppcheck 
--template {file};{line};{severity};{id};{message} --enable=all --enable=style 
--enable=unusedFunction --enable=all --check-config utils/Config.cpp
Checking utils/Config.cpp...
Checking usage of global functions..
Duration 108 ms.

Original comment by [email protected] on 3 Jan 2012 at 9:24

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
I'm not sure if this is related, but I discovered that --template 
{file};{line};{severity};{id};{message} isn't compliant to what cppcheck shows 
me in the help.
It should be --template='{file};{line};{severity};{id};{message}'.
Otherwise it seems like other parameters like --enable=all are ignored.

Although it works from eclipse: it might be a good idea to surround the path of 
the file to check with a double quote.

I'm using eclipse 3.7 with the latest cppcheclipse.
cppcheck is provided by cygwin in version 1.53.
The OS is WinXP.

Regards,
Manuel

Original comment by [email protected] on 21 Mar 2012 at 9:13

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024
Cppcheclipse shows no issues as it is called with --check-config. Obviously 
this additional parameter was given in the configuration. As soon as you remove 
it, cppcheclipse will give out the correct warnings. This behaviour is equal to 
the one on the command line. If you call cppcheck with --check-config, it will 
not give out any warnings for the attached file.
Although the syntax --template=<format> was introduced with cppcheck 1.52 even 
with the current version, the old format --template <format> is still 
supported. Nevertheless I will use the new format --template=<format> with the 
upcoming version of cppcheclipse and increase the minimal supported version of 
cppcheck to 1.52.

Original comment by [email protected] on 16 Jul 2012 at 6:55

from cppcheclipse.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 27, 2024

Original comment by [email protected] on 1 Sep 2012 at 3:39

  • Changed state: Invalid

from cppcheclipse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.