Skip to content

Commit

Permalink
enable Lint/FloatComparison but disable in test suite; add exclusion …
Browse files Browse the repository at this point in the history
…in main code
  • Loading branch information
mojavelinux committed Jun 6, 2021
1 parent f530274 commit 6253ceb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ Lint/EmptyInPattern:
Lint/EmptyWhen:
Enabled: false
Lint/FloatComparison:
Enabled: false # NOTE needed for tests
Enabled: true
Exclude: [ spec/*.rb ]
Lint/IdentityComparison:
Enabled: true
Lint/LambdaWithoutLiteralBlock:
Expand Down
4 changes: 2 additions & 2 deletions lib/asciidoctor/pdf/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def convert_document doc
end

unless page_count < body_start_page_number
layout_running_content :header, doc, num_front_matter_pages, body_start_page_number unless doc.noheader || @theme.header_height.to_f == 0
layout_running_content :footer, doc, num_front_matter_pages, body_start_page_number unless doc.nofooter || @theme.footer_height.to_f == 0
layout_running_content :header, doc, num_front_matter_pages, body_start_page_number unless doc.noheader || @theme.header_height.to_f == 0 # rubocop:disable Lint/FloatComparison
layout_running_content :footer, doc, num_front_matter_pages, body_start_page_number unless doc.nofooter || @theme.footer_height.to_f == 0 # rubocop:disable Lint/FloatComparison
end

add_outline doc, (doc.attr 'outlinelevels', toc_num_levels), toc_page_nums, num_front_matter_pages[1], has_front_cover
Expand Down

0 comments on commit 6253ceb

Please sign in to comment.