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
4639c4ba
Commit
4639c4ba
authored
Mar 11, 2018
by
davemachado
Browse files
Update test formatting
parent
eb494207
Changes
1
Hide whitespace changes
Inline
Side-by-side
build/validate_format.py
View file @
4639c4ba
...
...
@@ -19,7 +19,7 @@ index_link = 5
errors
=
[]
title_links
=
[]
anchor_re
=
re
.
compile
(
'###
\s(.+)'
)
anchor_re
=
re
.
compile
(
anchor
+
'
\s(.+)'
)
section_title_re
=
re
.
compile
(
'\*\s\[(.*)\]'
)
...
...
@@ -128,6 +128,7 @@ def check_format(filename):
category_line
=
line_num
num_in_category
=
0
continue
# skips lines that we do not care about
if
not
line
.
startswith
(
'|'
)
or
line
.
startswith
(
'|---'
):
continue
num_in_category
+=
1
...
...
@@ -144,11 +145,9 @@ def check_format(filename):
def
main
():
num_args
=
len
(
sys
.
argv
)
if
num_args
<
2
:
if
len
(
sys
.
argv
)
<
2
:
print
(
"No file passed (file should contain Markdown table syntax)"
)
sys
.
exit
(
1
)
check_format
(
sys
.
argv
[
1
])
if
len
(
errors
)
>
0
:
for
err
in
errors
:
...
...
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