@classmethod<EOL><INDENT>def _check_section_underline(cls, section_name, context, indentation):<DEDENT>
blank_lines_after_header = <NUM_LIT:0><EOL>for line in context.following_lines:<EOL><INDENT>if not is_blank(line):<EOL><INDENT>break<EOL><DEDENT>blank_lines_after_header += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>yield violations.D407(section_name)<EOL>return<EOL><DEDENT>non_empty_line = context.following_lines[blank_lines_after_header]<EOL>dash_line_found = '<STR_LIT>'.join(set(non_empty_line.strip())) == '<STR_LIT:->'<EOL>if not dash_line_found:<EOL><INDENT>yield violations.D407(section_name)<EOL>if blank_lines_after_header > <NUM_LIT:0>:<EOL><INDENT>yield violations.D412(section_name)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if blank_lines_after_header > <NUM_LIT:0>:<EOL><INDENT>yield violations.D408(section_name)<EOL><DEDENT>if non_empty_line.strip() != "<STR_LIT:->" * len(section_name):<EOL><INDENT>yield violations.D409(len(section_name),<EOL>section_name,<EOL>len(non_empty_line.strip()))<EOL><DEDENT>if leading_space(non_empty_line) > indentation:<EOL><INDENT>yield violations.D215(section_name)<EOL><DEDENT>line_after_dashes_index = blank_lines_after_header + <NUM_LIT:1><EOL>if line_after_dashes_index < len(context.following_lines):<EOL><INDENT>line_after_dashes =context.following_lines[line_after_dashes_index]<EOL>if is_blank(line_after_dashes):<EOL><INDENT>rest_of_lines =context.following_lines[line_after_dashes_index:]<EOL>if not is_blank('<STR_LIT>'.join(rest_of_lines)):<EOL><INDENT>yield violations.D412(section_name)<EOL><DEDENT>else:<EOL><INDENT>yield violations.D414(section_name)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>yield violations.D414(section_name)<EOL><DEDENT><DEDENT>
D4{07,08,09,12}, D215: Section underline checks.

        Check for correct formatting for docstring sections. Checks that:
            * The line that follows the section name contains
              dashes (D40{7,8}).
            * The amount of dashes is equal to the length of the section
              name (D409).
            * The section's content does not begin in the line that follows
              the section header (D412).
            * The indentation of the dashed line is equal to the docstring's
              indentation (D215).