Lines Matching refs:current_section

58             current_section = None           # the name of the current section
77 report('whitespace/line_length', f'{file}:{lineno+1} ({current_section})', f'line is too long ({len(line)} vs. 160 chars)')
81 current_section = line.strip('<!-- NOLINT')
82 current_section = current_section.strip(' -->')
83 existing_sections.append(current_section)
88 if current_section in documented_overloads and last_overload != 0:
89 if len(documented_overloads[current_section]) > 0 and len(documented_overloads[current_section]) != last_overload:
91 undocumented = [x for x in expected if x not in documented_overloads[current_section]]
92 unexpected = [x for x in documented_overloads[current_section] if x not in expected]
94 report('style/numbering', f'{file}:{lineno} ({current_section})', f'undocumented overloads: {", ".join([f"({x})" for x in undocumented])}')
96 report('style/numbering', f'{file}:{lineno} ({current_section})', f'unexpected overloads: {", ".join([f"({x})" for x in unexpected])}')
98 current_section = line.strip('## ')
99 existing_sections.append(current_section)
101 if current_section in expected_sections:
102 idx = expected_sections.index(current_section)
104 report('structure/section_order', f'{file}:{lineno+1}', f'section "{current_section}" is in an unexpected order (should be before "{expected_sections[section_idx]}")')
108 report('structure/unknown_section', f'{file}:{lineno+1}', f'section "{current_section}" is not part of the expected sections')
114 if current_section not in documented_overloads:
115 documented_overloads[current_section] = []
116 documented_overloads[current_section].append(number)
138 report('whitespace/blank_lines', f'{file}:{lineno}-{lineno+1} ({current_section})', 'consecutive blank lines')
143 report('style/admonition_title', f'{file}:{lineno} ({current_section})', f'"{untitled_admonition.group(2)}" admonitions should have a title')