spark2014.py 文件源码

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

项目:gnatdashboard 作者: AdaCore 项目源码 文件源码
def __parse_line(self, regex):
        """Parse a GNATprove message line.

        Adds the message to the current database session.

        Retrieves following information:

            * source basename
            * line in source
            * rule identification
            * message description

        :param re.RegexObject regex: the result of the _MESSAGE regex
        """

        filename = regex.group('file')
        src = GNAThub.Project.source_file(filename)
        line = regex.group('line')
        column = regex.group('column')
        message = regex.group('message')
        msg_id = regex.group('msg_id')
        category = regex.group('category').lower()

        record = self.msg_ids.get((filename, int(msg_id)))

        if record is None:
            self.log.warn(
                '%s: failed to get record for msg_id #%s', filename, msg_id)
            return

        rule_id = record['rule'].lower()
        self.__add_message(src, line, column, rule_id, message, category)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号