🚸 add NOLINT comment
This commit is contained in:
parent
12d6672d60
commit
28f7780ba5
@ -14,6 +14,8 @@ No-throw guarantee: this member function never throws exceptions.
|
||||
|
||||
Linear.
|
||||
|
||||
<!-- NOLINT Examples -->
|
||||
|
||||
## Version history
|
||||
|
||||
- Added in version 1.0.0.
|
||||
|
||||
@ -75,6 +75,12 @@ def check_structure():
|
||||
if len(line) > 160 and '|' not in line:
|
||||
report('whitespace/line_length', f'{file}:{lineno+1} ({current_section})', f'line is too long ({len(line)} vs. 160 chars)')
|
||||
|
||||
# sections in `<!-- NOLINT -->` comments are treated as present
|
||||
if line.startswith('<!-- NOLINT'):
|
||||
current_section = line.strip('<!-- NOLINT')
|
||||
current_section = current_section.strip(' -->')
|
||||
existing_sections.append(current_section)
|
||||
|
||||
# check if sections are correct
|
||||
if line.startswith('## '):
|
||||
# before starting a new section, check if the previous one documented all overloads
|
||||
|
||||
Loading…
Reference in New Issue
Block a user