cppcheclipse
cppcheclipse copied to clipboard
parse error, not problems reported
What steps will reproduce the problem?
1. run cppcheck on CDT project
What is the expected output?
1. Would expect to see problems and markers.
What do you see instead?
1. I do see console run, but I don't think it likes the template
Command line: \\\cygwin-1.7.29\bin\cppcheck.exe
--template={file};{line};{severity};{id};{message} --enable=all --verbose
--force --std=c++03 --file-list=-
Checking foo.cpp...
file;line;severity;id;message
1/249 files checked 0% done
if I drop to a cmd window, put more quotes around the --template arg and >2 to
a capture file, it does appear to do something
Please provide output
of the console view of cppcheclipse as well as the Eclipse error log.
1. error log has this
!ENTRY com.googlecode.cppcheclipse.core 2 1 2014-07-17 10:44:26.083
!MESSAGE Problems parsing a result line
!STACK 0
java.lang.IllegalArgumentException: Could not parse the second token in line:
'file;line;severity;id;message' into an Integer
at com.googlecode.cppcheclipse.core.command.CppcheckCommand.parseResult(CppcheckCommand.java:319)
at com.googlecode.cppcheclipse.core.command.CppcheckCommand.parseResultLines(CppcheckCommand.java:276)
at com.googlecode.cppcheclipse.core.command.CppcheckCommand.run(CppcheckCommand.java:249)
at com.googlecode.cppcheclipse.core.Checker.run(Checker.java:108)
at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.runChecker(Builder.java:133)
at com.googlecode.cppcheclipse.ui.Builder.processResource(Builder.java:309)
at com.googlecode.cppcheclipse.ui.commands.RunCodeAnalysis$RunCodeAnalysisJob.runResource(RunCodeAnalysis.java:26)
at com.googlecode.cppcheclipse.ui.commands.ResourceSelectionJob.run(ResourceSelectionJob.java:44)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NumberFormatException: For input string: "line"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.googlecode.cppcheclipse.core.command.CppcheckCommand.parseResult(CppcheckCommand.java:310)
... 8 more
What version of the
1. cppcheclipse (1.0.0),
2. cppcheck (1.65 part of Cygwin 1.7.29, 1.59 part of Cygwin 1.7.9)
3. Eclipse (indigo-sr1 20110916-0149)
4. Java (1.7.0_55)
are you using?
On what operating system?
1. win7
Please provide any additional information below.
Original issue reported on code.google.com by [email protected] on 17 Jul 2014 at 3:08
I have never seen an output like that:
Checking foo.cpp...
file;line;severity;id;message
1/249 files checked 0% done
Can you please provide me with the foo.cpp so that I can reproduce?
Original comment by [email protected] on 3 Aug 2014 at 11:12
Also could you please provide the output of cppcheck if you directly execute
the same command on the command line?
Original comment by [email protected] on 3 Aug 2014 at 11:18
Did not receive any further information, therefore closing this issue as
invalid.
Original comment by [email protected] on 4 Nov 2014 at 9:53
- Changed state: Invalid
Pretty certain this is an issue with running the Cygwin version of cppcheck.
Enclosing in single quotes seems to resolve the issue.
Original comment by [email protected] on 11 Jun 2015 at 7:13
What exactly does need to be enclosed in single quotes? The value of the
template option?
Original comment by [email protected] on 12 Jun 2015 at 6:31