Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 51a8225

Browse files
committed
Configure link checker for v4
1 parent 2e8b699 commit 51a8225

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

_config.checks.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@
33
# For configuration defaults, refer to: https://github.com/gjtorikian/html-proofer/blob/master/lib/html-proofer/configuration.rb
44
#
55
html-proofer:
6+
# Do not flag a tags missing href
7+
:allow_missing_href: true
8+
9+
# Ignores images with missing alt tags
10+
:ignore_missing_alt: true
11+
12+
# Ignores images with empty alt tags.
13+
:empty_alt_ignore: true
614

715
# Validate HTML
816
:check_html: true
917

1018
# Do not check external links.
1119
:disable_external: true
1220

13-
# Report only errors that fall within the 4xx status code range.
14-
:only_4xx: true
15-
16-
# Ignores images with empty alt tags.
17-
:empty_alt_ignore: true
18-
1921
# Sort errors by description in the report
2022
:error_sort: :desc
21-
22-
# Use up to 3 parallel processes to speed up internal file checks.
23-
:parallel:
24-
:in_processes: 3

lib/link_checker.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def self.options
1818
return config['html-proofer'] unless ENV['BUILD_NUMBER']
1919

2020
staging_prefix = '/' + ENV['BUILD_NUMBER']
21-
url_swap = { url_swap: { /\A#{staging_prefix}/ => '' } }
21+
url_swap = { swap_urls: { /\A#{staging_prefix}/ => '' } }
2222
config['html-proofer'].merge(url_swap)
2323
end
2424

0 commit comments

Comments
 (0)