Menu

Failed to generate htmlfile from xml

Rafał
2020-04-21
2020-04-22
  • Rafał

    Rafał - 2020-04-21

    Hi,
    When I create xml(in example Krita source code or Godot Engine)

    cppcheck -q -j8 --enable=all --suppress=missingIncludeSystem --suppress=variableScope --suppress=ConfigurationNotChecked --suppress=unusedFunction --force --xml --xml-version=2 . 2>&1 | tee cppcheckTEMP.xml
    

    then in file there is one line which broke htmlreport because is outside <xml></xml>

    cppcheck: unusedFunction check can't be used with '-j' option. Disabling unusedFunction check.
    <?xml version="1.0" encoding="UTF-8"?>
    <results version="2">
        <cppcheck version="1.88"/>
        <errors>
    
     
    • versat

      versat - 2020-04-22

      If you only want the XML output then you have to only use the output to stderr.
      But I suggest to use --output-file=errors.xml instead. IMHO that is more clean than catching some output.

       
  • Rafał

    Rafał - 2020-04-22

    Shouldn't cppcheck: unusedFunction check can't be used with '-j' option. Disabling unusedFunction check. be also added to xml file as error?

     
    • versat

      versat - 2020-04-22

      Hmm, maybe. All the other similar messages that are caused by invalid options directly quit Cppcheck with the error message. This specific error message is an exception, the analysis still starts and only this hint is printed. Adding this as a global error to the XML file could be useful.
      Maybe @danielmarjamaki has an opinion about that.

       
  • Daniel Marjamäki

    that is different. currently it doesn't have file/line/column/severity/error id
    somehow using information severity might work but well this is a different message.
    maybe we can just print the message and stop cppcheck like when other options are wrong..

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.