Commit ee1c8ac6 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'doc/print-broken-urls' into 'dev'

tools/validate-links.py: display again failed url after the summary

See merge request !573
parents 523ee85f 3dab842c
Pipeline #113257 failed with stages
in 13 minutes and 6 seconds
......@@ -22,6 +22,7 @@ STATUS = {
}
stats = defaultdict(int)
failed = []
def check_url(url, ids=[]):
......@@ -51,6 +52,8 @@ def check_file(f):
ok = check_url(url, ids)
print(STATUS[ok] + ' ' + url)
globals()['stats'][ok] += 1
if ok == False:
failed.append(url)
print()
......@@ -59,6 +62,10 @@ def print_stats():
for k, v in STATUS.items():
print(' %s : %3d' % (v, globals()['stats'][k]))
if globals()['stats'][False]:
print('==== Failed')
for f in failed:
print(' ' + f)
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment