Add and appy MultilineOperationIndentation rule

This way it's easier to see when lines are part of multiline
statements and when they belong to `if` statements.
This commit is contained in:
Javi Martín
2023-07-01 17:02:52 +02:00
parent 8b13daad95
commit 32b1fc53e1
14 changed files with 25 additions and 22 deletions

View File

@@ -1,8 +1,8 @@
module AdminBudgetInvestmentsHelper
def advanced_menu_visibility
if params[:advanced_filters].empty? &&
params["min_total_supports"].blank? &&
params["max_total_supports"].blank?
params["min_total_supports"].blank? &&
params["max_total_supports"].blank?
"hide"
else
""

View File

@@ -35,7 +35,7 @@ module GlobalizeHelper
def first_i18n_content_translation_locale
if I18nContentTranslation.existing_languages.count == 0 ||
I18nContentTranslation.existing_languages.include?(I18n.locale)
I18nContentTranslation.existing_languages.include?(I18n.locale)
I18n.locale
else
I18nContentTranslation.existing_languages.first

View File

@@ -25,17 +25,17 @@ module ManagementHelper
def menu_create_investments?
(controller_name == "budget_investments" && action_name == "new") ||
(controller_name == "budgets" && action_name == "create_investments")
(controller_name == "budgets" && action_name == "create_investments")
end
def menu_support_investments?
(controller_name == "budget_investments" && action_name == "index") ||
(controller_name == "budgets" && action_name == "support_investments")
(controller_name == "budgets" && action_name == "support_investments")
end
def menu_print_investments?
(controller_name == "budget_investments" && action_name == "print") ||
(controller_name == "budgets" && action_name == "print_investments")
(controller_name == "budgets" && action_name == "print_investments")
end
def menu_user_invites?

View File

@@ -10,7 +10,7 @@ module MilestonesHelper
"aria-valuemin": "0",
tabindex: "0" do
tag.span(class: "progress-meter", style: "width: #{progress_bar.percentage}%;") +
tag.p(text, class: "progress-meter-text")
tag.p(text, class: "progress-meter-text")
end
end
end

View File

@@ -2,8 +2,8 @@ module PollRecountsHelper
def total_recounts_by_booth(booth_assignment)
if booth_assignment.recounts.any?
booth_assignment.recounts.sum(:total_amount) +
booth_assignment.recounts.sum(:white_amount) +
booth_assignment.recounts.sum(:null_amount)
booth_assignment.recounts.sum(:white_amount) +
booth_assignment.recounts.sum(:null_amount)
end
end
end

View File

@@ -49,7 +49,7 @@ module ProposalsDashboardHelper
def is_proposed_action_request?
controller_name == "dashboard" && action_name == "new_request" &&
dashboard_action&.proposed_action?
dashboard_action&.proposed_action?
end
def is_request_active(id)

View File

@@ -16,7 +16,7 @@ module UsersHelper
deleted_commentable_text(comment)
elsif commentable.hidden?
tag.del(commentable.title) + " " +
tag.span("(#{deleted_commentable_text(comment)})", class: "small")
tag.span("(#{deleted_commentable_text(comment)})", class: "small")
else
link_to(commentable.title, comment)
end

View File

@@ -25,7 +25,7 @@ module WelcomeHelper
def calculate_image_path(recommended, image_default)
if recommended.respond_to?(:image) && recommended.image.present? &&
recommended.image.attachment.attached?
recommended.image.attachment.attached?
recommended.image.variant(:medium)
elsif image_default.present?
image_default