#5178 Supply DTD/(XSD/RNG for cppcheck XML output. Add target to Makefile to create and validate XML from regular run. Update xmlV2.rng accordingly.
This commit is contained in:
parent
c07abdd382
commit
ceff09d491
9
Makefile
9
Makefile
|
@ -319,10 +319,13 @@ validatePlatforms: ${PlatformFilesCHECKED}
|
|||
# Validate XML output (to detect regressions)
|
||||
/tmp/errorlist.xml: cppcheck
|
||||
cppcheck --errorlist >$@
|
||||
/tmp/example.xml: cppcheck
|
||||
cppcheck --xml --inconclusive -j 4 cli externals gui lib test 2>/tmp/example.xml
|
||||
createXMLExamples:/tmp/errorlist.xml /tmp/example.xml
|
||||
.PHONY: validateXMLV2
|
||||
validateXMLV2: /tmp/errorlist.xml
|
||||
xmllint --noout --relaxng xmlV2.rng $<
|
||||
|
||||
validateXMLV2: createXMLExamples
|
||||
xmllint --noout --relaxng xmlV2.rng /tmp/errorlist.xml
|
||||
xmllint --noout --relaxng xmlV2.rng /tmp/example.xml
|
||||
|
||||
###### Build
|
||||
|
||||
|
|
|
@ -417,9 +417,13 @@ int main(int argc, char **argv)
|
|||
fout << "# Validate XML output (to detect regressions)\n";
|
||||
fout << "/tmp/errorlist.xml: cppcheck\n";
|
||||
fout << "\tcppcheck --errorlist >$@\n";
|
||||
fout << "/tmp/example.xml: cppcheck\n";
|
||||
fout << "\tcppcheck --xml --inconclusive -j 4 cli externals gui lib test 2>/tmp/example.xml\n";
|
||||
fout << "createXMLExamples:/tmp/errorlist.xml /tmp/example.xml\n";
|
||||
fout << ".PHONY: validateXMLV2\n";
|
||||
fout << "validateXMLV2: /tmp/errorlist.xml\n";
|
||||
fout << "\txmllint --noout --relaxng xmlV2.rng $<\n\n";
|
||||
fout << "validateXMLV2: createXMLExamples\n";
|
||||
fout << "\txmllint --noout --relaxng xmlV2.rng /tmp/errorlist.xml\n";
|
||||
fout << "\txmllint --noout --relaxng xmlV2.rng /tmp/example.xml\n";
|
||||
|
||||
fout << "\n###### Build\n\n";
|
||||
|
||||
|
|
|
@ -30,15 +30,20 @@
|
|||
</attribute>
|
||||
<attribute name="verbose"/>
|
||||
<choice>
|
||||
<zeroOrMore>
|
||||
<element name="location">
|
||||
<attribute name="file"/>
|
||||
<optional>
|
||||
<attribute name="info"/>
|
||||
</optional>
|
||||
<attribute name="line">
|
||||
<data type="integer"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="symbol">
|
||||
<data type="string"/>
|
||||
<data type="anyURI"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</choice>
|
||||
|
|
Loading…
Reference in New Issue