1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-07 23:41:10 +03:00

Documentation change (#3672)

Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
This commit is contained in:
Niels Lohmann
2022-08-05 19:51:39 +02:00
committed by GitHub
parent 9e1a7c85e3
commit 7b6cf5918b
65 changed files with 582 additions and 302 deletions

View File

@ -3,6 +3,7 @@
import glob
import os.path
import re
import sys
warnings = 0
@ -75,6 +76,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
@ -167,3 +174,6 @@ if __name__ == '__main__':
check_structure()
check_examples()
print(120 * '-')
if warnings > 0:
sys.exit(1)