cppcheck.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def _save_xml_report(self, s):
        '''use cppcheck xml result string, add the command string used to invoke cppcheck
        and save as xml file.
        '''
        header = '%s\n' % s.splitlines()[0]
        root = ElementTree.fromstring(s)
        cmd = ElementTree.SubElement(root.find('cppcheck'), 'cmd')
        cmd.text = str(self.cmd)
        body = ElementTree.tostring(root)
        node = self.generator.path.get_bld().find_or_declare('cppcheck.xml')
        node.write(header + body)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号