diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 6cb38fcc233..7c476be8012 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -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 diff --git a/app/views/notification_mailer/_status.html.haml b/app/views/notification_mailer/_status.html.haml index 4ea3d2c45e1..c85253ac084 100644 --- a/app/views/notification_mailer/_status.html.haml +++ b/app/views/notification_mailer/_status.html.haml @@ -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? diff --git a/app/views/statuses/_poll.html.haml b/app/views/statuses/_poll.html.haml index 21870af4460..b537eb48cac 100644 --- a/app/views/statuses/_poll.html.haml +++ b/app/views/statuses/_poll.html.haml @@ -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}%"