def _error_to_tuple(self, error):
        error_messages = error.get('message', [])
        match = self.filename == error_messages[0]['path']
        # TODO(nsfmc): `line_col_base` won't work b/c we avoid `split_match`'s codepath
        line = error_messages[0]['line'] - 1
        col = error_messages[0]['start'] - 1

        level = error_messages[0].get('level', False) or error.get('level', '')
        is_error = level == 'error'
        is_warning = level == 'warning'

        combined_message = " ".join([m.get('descr', '') for m in error_messages])

        near_match = re.search(self.__flow_near_re, combined_message)
        near = near_match.group('near') if near_match else None
        persist.debug('flow line: {}, col: {}, level: {}, message: {}'.format(
            line, col, level, combined_message))

        return (match, line, col, is_error, is_warning, combined_message, near)
Filter records and remove items with missing or inconsistent fields
dataset/ETHPy150Open SublimeLinter/SublimeLinter-flow/linter.py/Flow._error_to_tuple--crossover with--dataset/ETHPy150Open yvesalexandre/bandicoot/bandicoot/io.py/filter_record