Author Topic: CppCheck version 1.73 xml-file will not be parsed  (Read 8451 times)

Offline eckard_klotz

  • Almost regular
  • **
  • Posts: 194
CppCheck version 1.73 xml-file will not be parsed
« on: April 17, 2016, 12:11:13 pm »
Hello Everybody.

I'm using currently the nightly from April the 11th together with a fresh installed CppCheck 1.73 on Windows 10.

If I use CppCheck I get finaly the following error-message in the log-window "CppCheck/Vera++":

Quote
Failed to parse cppcheck XML file.
Probably it's not produced correctly.

The xml-output before looks plausible but I'm not able to tell you what may have changed in its structure.

This is the complete output is attached as file.

Best regards,
                   Eckard Klotz.

Offline eckard_klotz

  • Almost regular
  • **
  • Posts: 194
Re: CppCheck version 1.73 xml-file will not be parsed
« Reply #1 on: April 17, 2016, 01:39:30 pm »
Hello again.

Since the analyis of CppCheck itself was working I used the output of the log-window to reduce the messages:
  • I have suppressed the meaasges variableScope and unusedFunction by adding
     " --suppress=variableScope --suppress=unusedFunction"
     to the settings (Environment) of CppCheck. But the result was the same.
  • Now I started to rework my code message-id for message-id. After reworking the ocurrences of redundantAssignment Code::Blocks was able to parse the xml-output of CppCheck.

I've attached the last output that was not parsed and the first output that was parsed.
The analysis was done with the setting:

--verbose --enable=all --enable=style --xml --suppress=variableScope --suppress=unusedFunction

best regards,
                    Eckard.

PS.: In the meanwhile I removed the suppression of variableScope and unusedFunction again and it works also.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CppCheck version 1.73 xml-file will not be parsed
« Reply #2 on: May 14, 2016, 06:48:20 am »
Could you bisect on the console whats the output of the default call with version 1.72 and then version 1.73 (assuming that the changes came with 1.73)? Then please posts both files here.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline eckard_klotz

  • Almost regular
  • **
  • Posts: 194
Re: CppCheck version 1.73 xml-file will not be parsed
« Reply #3 on: May 16, 2016, 04:28:07 pm »
Hello Morten.

As you may have noticed between my last post and today one month has passed by and in the meanwhile I continued my development. Furthermore I have updated from an older version of cpp-check.

However I used 2 projects to create example-outputs (content of console and message window as far as possible). I used the cpp-check versions 1.70 and 1.73.

I attach 2 zip-files one for the working project where you will find 4 text-files with the content of the console-window as well as the associated messages created with 1.70 and with 1.73. The second zip-file contains only 3 text-files since the messages were not created by 1.73


The content of the application-configuration is : C:\Tool\Development\CppCheck\1_7x\bin\cppcheck.exe
The content of the argument-configuration is:--verbose --enable=all --enable=style --xml
I still use the last nightly from 11.04.2016 (10762) on Windows 10.

I hope this will help you.

Best regards,
                    Eckard. 

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CppCheck version 1.73 xml-file will not be parsed
« Reply #4 on: August 07, 2016, 12:21:40 pm »
...still: I can't reproduce. Even with CppCheck v1.75 it works just fine for me. You could try to enforce version 1 of the XML file format for CppCheck. But if you don't do something special it is the default version anyway.

I tried with this command line:
-j 8 -i$(#wx.base) --verbose --enable=all --suppress=variableScope --suppress=unusedFunction --enable=style --xml --xml-version=1

(Windows 10, too btw...)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CppCheck version 1.73 xml-file will not be parsed
« Reply #5 on: August 10, 2016, 07:59:45 pm »
OK - Support for XML format version 2 is implemented natively in SVN HEAD and will ship with the next nightly. Let me know in case you still have issues... (C::B will detect the version automatically and pick the right parser.)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ