gearheads
/
mastodon
Archived
2
0
Fork 0

Fix haml-lint Rubocop `Style/NumericPredicate` cop (#26040)

gh/dev
Matt Jankowski 2023-07-20 09:13:06 -04:00 committed by GitHub
parent 586b1c9dca
commit df05ece265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -1,13 +1,13 @@
# This configuration was generated by
# `haml-lint --auto-gen-config`
# on 2023-07-18 12:15:07 -0400 using Haml-Lint version 0.48.0.
# on 2023-07-19 06:41:20 -0400 using Haml-Lint version 0.48.0.
# The point is for the user to remove these configuration records
# one by one as the lints are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of Haml-Lint, may require this file to be generated again.
linters:
# Offense count: 950
# Offense count: 951
LineLength:
enabled: false
@ -15,7 +15,7 @@ linters:
UnnecessaryStringOutput:
enabled: false
# Offense count: 62
# Offense count: 59
RuboCop:
enabled: false

View File

@ -33,7 +33,7 @@
.auto-dir
= status_content_format(status)
- if status.ordered_media_attachments.size > 0
- if status.ordered_media_attachments.size.positive?
%p
- status.ordered_media_attachments.each do |a|
- if status.local?

View File

@ -8,7 +8,7 @@
- poll.loaded_options.each_with_index do |option, index|
%li
- if show_results
- percent = total_votes_count > 0 ? 100 * option.votes_count / total_votes_count : 0
- percent = total_votes_count.positive? ? 100 * option.votes_count / total_votes_count : 0
%label.poll__option><
%span.poll__number><
= "#{percent.round}%"