Skip to content

Commit 465eaf0

Browse files
committed
Note if exist code 1 for skiping link
1 parent 61a96dd commit 465eaf0

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

linkstatus/linkstatus.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,20 @@ def main(source, recursive, timeout, retry):
7777
exit_code = 1
7878

7979
click.echo(
80-
"{icon} L{ln} : {url}".format(
80+
"{icon} L{ln} : {url} {code}".format(
8181
icon=click.style(icon, fg=fg, bold=True),
8282
ln=link.line,
8383
url=click.style(url, fg=fg),
84+
code="" if code == 200 else "({})".format(code),
8485
)
8586
)
86-
87+
if exit_code == 1:
88+
click.echo(
89+
click.style(
90+
"Note: Use `noqa` inline comment to skip link check. "
91+
"eg. response code 403 due to header restrictions etc...",
92+
fg="red",
93+
bold=True,
94+
)
95+
)
8796
exit(exit_code)

0 commit comments

Comments
 (0)