Comments (9)
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.
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.
Please attach that file here.
Original comment by [email protected]
on 15 Dec 2011 at 7:59
from cppcheclipse.
Original comment by [email protected]
on 16 Dec 2011 at 7:58
Attachments:
from cppcheclipse.
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.
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.
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.
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.
Original comment by [email protected]
on 1 Sep 2012 at 3:39
- Changed state: Invalid
from cppcheclipse.
Related Issues (20)
- Cannot install cppcheclipse 0.98 on Eclipse Helios HOT 3
- cppcheckclipse_0.9.8.zip is ignored in dropins folder HOT 2
- NullPointerException running cppcheck HOT 4
- Not expanding variables ${name} HOT 1
- Can't include files not in workspace directory HOT 7
- cppcheclipse uses file names on command-line (instead of from file with --file-list) which limits the amount of files that can be used as input HOT 12
- Errors disappear when compiling multiple projects HOT 1
- File not included in the Problems pane HOT 6
- Add suppressions for entire directories HOT 3
- cppcheclipse produce no output in the problems tab HOT 4
- can't configure wrapper script for cppcheck in preferences HOT 3
- cppcheclipse fails to check when C++ 03 is specified. HOT 4
- Could not initialize cppcheck with Eclipse Kepler, OSX, SUbversion HOT 5
- Error reading filename of appendages HOT 1
- cppcheck option not showing in Eclipse->P HOT 2
- template flag is hard-coded, can't change to 'gcc' HOT 2
- parse error, not problems reported HOT 6
- Creating xml output file doesn't work HOT 1
- Source files and paths not displaying HOT 4
- Null Pointer For Non-Existent Path
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppcheclipse.