Browse Source

Create a error message generator

pull/3011/head
Matheus Felipe 2 years ago
parent
commit
2501df6b93
No known key found for this signature in database GPG Key ID: AA785C523274872F
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      scripts/validate/format.py

+ 5
- 0
scripts/validate/format.py View File

@@ -23,3 +23,8 @@ title_links = []
anchor_re = re.compile(anchor + '\s(.+)')
section_title_re = re.compile('\*\s\[(.*)\]')
link_re = re.compile('\[(.+)\]\((http.*)\)')


def error_message(line_number: int, message: str) -> str:
line = line_number + 1
return f'(L{line:03d}) {message}'

Loading…
Cancel
Save