XML Content
The content of the ’Diag’ element is controlled by the ‑‑xml‑format
and ‑‑format
options. The ‑‑xml‑format
option is a quoted string in which the following specifiers are recognized. If present, the corresponding element will be present in the diagnostic output:
Specifier to XML Mapping
Specifier | XML Tag | Description |
---|---|---|
%B |
<BaseName> |
Base file name |
%c |
<Column> |
Column number |
%C |
<ZeroColumn> |
Column number less 1 (left column is 0) |
%e |
<MsgExtText> |
Message extension information |
%f |
<FileName> |
File name |
%F |
<FilePath> |
File name (absolute, including path) |
%g |
<MsgLevel> |
Message level |
<RuleId> |
Parent Rule Id(s) 1 |
|
%H |
<HelpPath> |
Message help file (absolute path) |
%I |
<RuleIds> <SingleRuleId>v |
All Rule Ids group Repeated for each Rule Id 1 |
%j |
<SuppJust> |
Suppression justification |
%K | <RuleCategories> | Rule Categories 1 2 |
%l |
<Line> |
Line number |
%m | <SuppMacroName> | Suppression Macro Name |
%M | <RuleGroupName> | Rule Group Name and last child Rule Id(s)1 |
%n |
<Msgnum> |
Message number (raw integer format) |
%N |
<PadMsgNum> |
Message number (zero padded to four digits) |
%p |
<Producer> |
Producer component (e.g. qacpp-3.1) |
%r |
<RuleNum> |
Last child Rule Id(s) 1 excluding the Parent Rule Id For Parent Rule Id, see %G |
%S |
<SuppMask> |
Suppression type |
%t |
<MsgText> |
Message text |
%u |
<Depth> |
Context message depth |
%v |
<VerboseText> |
Rule Id(s) and text (must have |
%Y |
<Severity> |
Severity |
%z |
<RuleHelpPath> |
Rule help file(s) (absolute path 1) |
1 If the ‑‑rule‑format
option is used then any rule elements will be enclosed in its own <RuleViolation>
element, repeated for each violation. Otherwise, each field will be repeated for each rule violation, separated by a ',' (comma).
2 Individual elements within a rule are '|' (bar) separated.
If any other specifiers are requested (such as Conditional Formatting or Message Text Control variables) these will have no effect and will be silently ignored.
If no ‑‑xml‑format
string is specified, then the following will be used:
The ‑‑format
option (refer to Formatting the Diagnostic String) produces formatted output. This formatted text can also be output in the XML by specifying a non-empty ‑‑format
string. In the XML it will be shown with the <Formatted>
element.
Embedded XML Header Content
When outputting with the ‑‑embed‑header‑messages
output, by default the XML elements and formatting are controlled by the ‑‑xml‑format
and ‑‑format
options as described above. For the embedded header files, you can refine this to be more suitable for these headers by altering ‑‑xml‑header‑format
and ‑‑header‑format
. The possible value for these options is identical to the non-header options.