Add SpaceAroundEqualsInParameterDefault rule

We were using it in most places, but not everywhere.
This commit is contained in:
Javi Martín
2019-10-24 16:25:20 +02:00
parent d938077813
commit 033f3c33e3
6 changed files with 9 additions and 6 deletions

View File

@@ -52,6 +52,9 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true
Layout/IndentationConsistency:
EnforcedStyle: indented_internal_methods

View File

@@ -23,7 +23,7 @@ module MapLocationsHelper
"remove-marker-link-#{dom_id(map_location)}"
end
def render_map(map_location, parent_class, editable, remove_marker_label, investments_coordinates=nil)
def render_map(map_location, parent_class, editable, remove_marker_label, investments_coordinates = nil)
map_location = MapLocation.new if map_location.nil?
map = content_tag :div, "",
id: dom_id(map_location),
@@ -46,7 +46,7 @@ module MapLocationsHelper
private
def prepare_map_settings(map_location, editable, parent_class, investments_coordinates=nil)
def prepare_map_settings(map_location, editable, parent_class, investments_coordinates = nil)
options = {
map: "",
map_center_latitude: map_location_latitude(map_location),

View File

@@ -105,7 +105,7 @@ class VotationType < ApplicationRecord
result
end
def create_question_answer(answer, hidden=false)
def create_question_answer(answer, hidden = false)
return if questionable.question_answers.where(title: answer).any?
questionable.question_answers

View File

@@ -25,7 +25,7 @@ ActsAsVotable::Vote.class_eval do
where(votable_type: "Legislation::Proposal", votable_id: proposals)
end
def self.for_budget_investments(budget_investments=Budget::Investment.all)
def self.for_budget_investments(budget_investments = Budget::Investment.all)
where(votable_type: "Budget::Investment", votable_id: budget_investments)
end

View File

@@ -36,7 +36,7 @@ module CommonActions
check "proposal_terms_of_service"
end
def set_officing_booth(booth=nil)
def set_officing_booth(booth = nil)
booth = create(:poll_booth) if booth.blank?
allow_any_instance_of(Officing::BaseController).

View File

@@ -13,7 +13,7 @@ module Users
click_button "Register"
end
def login_through_form_with_email_and_password(email="manuela@consul.dev", password="judgementday")
def login_through_form_with_email_and_password(email = "manuela@consul.dev", password = "judgementday")
visit root_path
click_link "Sign in"