def checkCurrentReleaseNotes(file_path, error_messages):
    in_current_release = False
    for (line_number, line) in enumerate(readLines(file_path)):

        def reportError(message):
            error_messages.append(('%s:%d: %s' % (file_path, (line_number + 1), message)))
        if VERSION_HISTORY_NEW_RELEASE_REGEX.match(line):
            if in_current_release:
                break
            in_current_release = True
        if (line.startswith('*') and (not VERSION_HISTORY_NEW_LINE_REGEX.match(line))):
            reportError(('Version history line malformed. Does not match VERSION_HISTORY_NEW_LINE_REGEX in check_format.py\n %s' % line))
def checkCurrentReleaseNotes(file_path, error_messages):
    in_current_release = False
    for (line_number, line) in enumerate(readLines(file_path)):

        def reportError(message):
            error_messages.append(('%s:%d: %s' % (file_path, (line_number + 1), message)))
        if VERSION_HISTORY_NEW_RELEASE_REGEX.match(line):
            if in_current_release:
                break
            in_current_release = True
        if (line.startswith('*') and (not VERSION_HISTORY_NEW_LINE_REGEX.match(line))):
            reportError(('Version history line malformed. Does not match VERSION_HISTORY_NEW_LINE_REGEX in check_format.py\n %s' % line))