Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
2501df6b
Unverified
Commit
2501df6b
authored
Jan 16, 2022
by
Matheus Felipe
Browse files
Create a error message generator
parent
c659e656
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/validate/format.py
View file @
2501df6b
...
...
@@ -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
:
03
d
}
)
{
message
}
'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment