1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #2907 (closed defect: invalid)

Opened 23 months ago

Last modified 23 months ago

Unable to save xml output

Reported by: javydreamercsw Owned by: noone
Priority: Milestone:
Component: Other Keywords:
Cc:

Description

See: https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=4&t=266

I'm using 1.49 and try the following to get the xml report to use with Hudson plugin:

cppcheck --xml --enable=all ./ > result.xml

But for some reason result.xml contains:

Checking error.c...
1/8 files checked 3% done
Checking fault.c...
2/8 files checked 6% done
Checking initialize.c...
3/8 files checked 15% done
Checking main.c...
4/8 files checked 31% done
Checking post.c...
5/8 files checked 35% done
Checking run_pump.c...
6/8 files checked 86% done
Checking standby.c...
7/8 files checked 92% done
Checking sxnpump.c...
8/8 files checked 100% done

Instead of what's displayed in the command prompt:

<?xml version="1.0" encoding="UTF-8"?>
<results>
<error file="main.c" line="250" id="unusedVariable" severity="style" msg="Unused
variable: temp"/>
</results>

Any idea?

Change History

Changed 23 months ago by javydreamercsw

Finally figured it out. The xml stuff displayed on the command screen is in stderr so need to do something like this instead: cppcheck --xml --enable=all ./ 2> result.xml

Not sure if that's the normal behavior. Leaving as new for evaluation.

Changed 23 months ago by kimmov

  • status changed from new to closed
  • resolution set to invalid
  • milestone 1.50 deleted

Well, reading the command line help helps:

    --xml                Write results in xml to error stream.

So, it is intentional behavior.

Note: See TracTickets for help on using tickets.