Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2022-05-23 02:09:06 +0300
committerEvan Read <eread@gitlab.com>2022-05-23 02:09:06 +0300
commit9d6211bf9a8c32877d32f72d052a7e4493c40b49 (patch)
treea4cbb0cfbbfefe86a8850b09dbb9b8c3936268b4 /lib/checks
parent7cb9ee4b1bc525f4589f3ea70690167a47e241f4 (diff)
Fix Style/Next Rubocop offenseseread/fix-next-rubocop-offenses
Diffstat (limited to 'lib/checks')
-rw-r--r--lib/checks/anchors.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/checks/anchors.rb b/lib/checks/anchors.rb
index f7dc5d52..79ecbd08 100644
--- a/lib/checks/anchors.rb
+++ b/lib/checks/anchors.rb
@@ -7,15 +7,15 @@ Nanoc::Check.define(:internal_anchors) do
next unless link.to_anchor?
next if link.anchor_name == 'markdown-toc'
- if link.destination_anchor_not_found?
- add_issue <<~ERROR
- Broken anchor detected!
- - source file `#{link.source_file}`
- - destination `#{link.destination_file}`
- - link `#{link.href}`
- - anchor `##{link.anchor_name}`
- ERROR
- end
+ next unless link.destination_anchor_not_found?
+
+ add_issue <<~ERROR
+ Broken anchor detected!
+ - source file `#{link.source_file}`
+ - destination `#{link.destination_file}`
+ - link `#{link.href}`
+ - anchor `##{link.anchor_name}`
+ ERROR
end
end
add_issue "#{issues.count} offenses found!" if issues.count.positive?