From 1a098dfcab0243837d9f5f726e4c0b28d22bfe7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 1 Jul 2023 18:18:22 +0200 Subject: [PATCH] Add and apply MultilineMethodCallBraceLayout rule In order for this rule to work effectively when running `--autocorrect`, we also need to enable the `ClosingParenthesisIndentation` rule. --- .rubocop.yml | 6 ++++++ .../budgets/investments/form_component.html.erb | 3 +-- .../budgets/investments/my_ballot_component.html.erb | 3 ++- app/components/debates/form_component.html.erb | 3 +-- app/components/proposals/form_component.html.erb | 3 +-- app/controllers/admin/budgets_controller.rb | 3 ++- app/models/comment.rb | 3 ++- app/models/organization.rb | 6 ++++-- app/models/user.rb | 3 ++- app/views/admin/officials/search.html.erb | 2 +- app/views/layouts/application.html.erb | 3 +-- app/views/legislation/proposals/_form.html.erb | 3 +-- app/views/legislation/proposals/_proposal.html.erb | 3 ++- app/views/mailer/budget_investment_created.html.erb | 3 ++- app/views/mailer/budget_investment_unfeasible.html.erb | 3 ++- app/views/mailer/comment.html.erb | 3 ++- app/views/mailer/direct_message_for_receiver.html.erb | 6 ++++-- app/views/mailer/email_verification.html.erb | 6 ++++-- app/views/mailer/evaluation_comment.html.erb | 3 +-- app/views/mailer/newsletter.html.erb | 3 ++- app/views/mailer/proposal_notification_digest.html.erb | 8 +++++--- app/views/mailer/reply.html.erb | 3 ++- app/views/organizations/registrations/new.html.erb | 3 +-- app/views/polls/_advanced_stats.html.erb | 3 ++- app/views/users/registrations/new.html.erb | 6 +++--- app/views/verification/residence/new.html.erb | 6 +++--- spec/components/sdg/tag_list_component_spec.rb | 3 +-- .../sdg/targets/plain_tag_list_component_spec.rb | 3 +-- spec/components/sdg/targets/tag_list_component_spec.rb | 3 +-- spec/components/shared/banner_component_spec.rb | 9 +++------ spec/models/budget/stats_spec.rb | 3 +-- spec/models/geozone_spec.rb | 3 ++- spec/system/admin/budget_investments_spec.rb | 6 ++---- spec/system/emails_spec.rb | 3 ++- spec/system/legislation/processes_spec.rb | 3 +-- spec/system/legislation/summary_spec.rb | 3 +-- 36 files changed, 74 insertions(+), 65 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b0b25095f..7d16caa06 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -30,6 +30,9 @@ Layout/AssignmentIndentation: Layout/ClosingHeredocIndentation: Enabled: true +Layout/ClosingParenthesisIndentation: + Enabled: true + Layout/DotPosition: Enabled: true @@ -108,6 +111,9 @@ Layout/MultilineHashBraceLayout: Layout/MultilineHashKeyLineBreaks: Enabled: true +Layout/MultilineMethodCallBraceLayout: + Enabled: true + Layout/MultilineMethodCallIndentation: Enabled: true diff --git a/app/components/budgets/investments/form_component.html.erb b/app/components/budgets/investments/form_component.html.erb index 9b28cb0ed..daa0aec4a 100644 --- a/app/components/budgets/investments/form_component.html.erb +++ b/app/components/budgets/investments/form_component.html.erb @@ -97,8 +97,7 @@ title: t("form.accept_terms_title"), label: t("form.accept_terms", policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank") - ) %> + conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> <% end %> diff --git a/app/components/budgets/investments/my_ballot_component.html.erb b/app/components/budgets/investments/my_ballot_component.html.erb index bf141f63e..307be97cc 100644 --- a/app/components/budgets/investments/my_ballot_component.html.erb +++ b/app/components/budgets/investments/my_ballot_component.html.erb @@ -25,7 +25,8 @@

<%= sanitize(ballot.change_vote_info( link: link_to(t("budgets.investments.index.sidebar.change_vote_link"), - budget_ballot_path(budget)))) %> + budget_ballot_path(budget)) + )) %>