def get_code_start_line_num(source_lines):
    """
    Get the start code line number exclude comments.

    Args:
        source_lines (list[str]): Split results of code.

    Returns:
        int, the start line number.
    """
    stack = []
    index = 0
    for i, line in enumerate(source_lines):
        line_strip = line.strip()
        if line_strip.startswith('#'):
            continue
        if line_strip.startswith('"""'):
            if not line_strip.endswith('"""'):
                stack.append('"""')
            continue
        if line_strip.startswith("'''"):
            if not line_strip.endswith("'''"):
                stack.append("'''")
            continue
        if line_strip.endswith('"""') or line_strip.endswith("'''"):
            stack.pop()
            continue
        if line_strip != '' and not stack:
            index = i
            break
    return index