Skip to content

Commit 4e65c7c

Browse files
committed
InvalidLinkBear: Remove FTP from regex
Remove 'ftp' from regex variable in `find_links_in_file()` method because Python `requests` library can't fetch the FTP status code. Closes coala#906
1 parent 5622736 commit 4e65c7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bears/general/InvalidLinkBear.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get_status_code(url, timeout):
4343
def find_links_in_file(file, timeout, link_ignore_regex):
4444
link_ignore_regex = re.compile(link_ignore_regex)
4545
regex = re.compile(
46-
r'((ftp|http)s?://[^.:%\s_/?#[\]@\\]+\.(?:[^\s()%\'"`<>|\\]+|'
46+
r'(https?://[^.:%\s_/?#[\]@\\]+\.(?:[^\s()%\'"`<>|\\]+|'
4747
r'\([^\s()%\'"`<>|\\]*\))*)(?<!\.)(?<!,)')
4848
for line_number, line in enumerate(file):
4949
match = regex.search(line)

0 commit comments

Comments
 (0)