🚸 add NOLINT comment

This commit is contained in:
Niels Lohmann 2022-08-04 23:46:56 +02:00
parent 12d6672d60
commit 28f7780ba5
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,8 @@ No-throw guarantee: this member function never throws exceptions.
Linear.
<!-- NOLINT Examples -->
## Version history
- Added in version 1.0.0.

View File

@ -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