Commit c9aa1988 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Enable Style/SpaceAroundEqualsInParameterDefault cop

parent aa49c20e
......@@ -373,6 +373,10 @@ Style/SpaceAfterNot:
Style/SpaceAfterSemicolon:
Enabled: true
# Use space around equals in parameter default
Style/SpaceAroundEqualsInParameterDefault:
Enabled: true
# Use a space around keywords if appropriate.
Style/SpaceAroundKeyword:
Enabled: true
......
......@@ -339,13 +339,6 @@ Style/SingleLineBlockParams:
Style/SingleLineMethods:
Enabled: false
# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: space, no_space
Style/SpaceAroundEqualsInParameterDefault:
Enabled: false
# Offense count: 119
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
......
......@@ -33,7 +33,7 @@ class RegistrationsController < Devise::RegistrationsController
protected
def build_resource(hash=nil)
def build_resource(hash = nil)
super
end
......
module ExploreHelper
def filter_projects_path(options={})
def filter_projects_path(options = {})
exist_opts = {
sort: params[:sort],
scope: params[:scope],
......
......@@ -107,7 +107,7 @@ module SearchHelper
Sanitize.clean(str)
end
def search_filter_path(options={})
def search_filter_path(options = {})
exist_opts = {
search: params[:search],
project_id: params[:project_id],
......
......@@ -36,7 +36,7 @@ class MergeRequestDiff < ActiveRecord::Base
real_size.presence || raw_diffs.size
end
def raw_diffs(options={})
def raw_diffs(options = {})
if options[:ignore_whitespace_change]
@raw_diffs_no_whitespace ||= begin
compare = Gitlab::Git::Compare.new(
......
......@@ -601,7 +601,7 @@ class Repository
commit(sha)
end
def next_branch(name, opts={})
def next_branch(name, opts = {})
branch_ids = self.branch_names.map do |n|
next 1 if n == name
result = n.match(/\A#{name}-([0-9]+)\z/)
......
......@@ -25,7 +25,7 @@ module Gitlab
end
end
def initialize(user, adapter=nil)
def initialize(user, adapter = nil)
@adapter = adapter
@user = user
@provider = user.ldap_identity.provider
......
......@@ -13,7 +13,7 @@ module Gitlab
Gitlab::LDAP::Config.new(provider)
end
def initialize(provider, ldap=nil)
def initialize(provider, ldap = nil)
@provider = provider
@ldap = ldap || Net::LDAP.new(config.adapter_options)
end
......
......@@ -5,7 +5,7 @@ module Gitlab
module Popen
extend self
def popen(cmd, path=nil)
def popen(cmd, path = nil)
unless cmd.is_a?(Array)
raise "System commands must be given as an array of strings"
end
......
......@@ -37,7 +37,7 @@ module Gitlab
redis_config_hash
end
def initialize(rails_env=nil)
def initialize(rails_env = nil)
rails_env ||= Rails.env
config_file = File.expand_path('../../../config/resque.yml', __FILE__)
......
......@@ -349,19 +349,19 @@ describe 'Git HTTP requests', lib: true do
end
end
def clone_get(project, options={})
def clone_get(project, options = {})
get "/#{project}/info/refs", { service: 'git-upload-pack' }, auth_env(*options.values_at(:user, :password, :spnego_request_token))
end
def clone_post(project, options={})
def clone_post(project, options = {})
post "/#{project}/git-upload-pack", {}, auth_env(*options.values_at(:user, :password, :spnego_request_token))
end
def push_get(project, options={})
def push_get(project, options = {})
get "/#{project}/info/refs", { service: 'git-receive-pack' }, auth_env(*options.values_at(:user, :password, :spnego_request_token))
end
def push_post(project, options={})
def push_post(project, options = {})
post "/#{project}/git-receive-pack", {}, auth_env(*options.values_at(:user, :password, :spnego_request_token))
end
......
......@@ -11,7 +11,7 @@
#
module Select2Helper
def select2(value, options={})
def select2(value, options = {})
raise ArgumentError, 'options must be a Hash' unless options.kind_of?(Hash)
selector = options.fetch(:from)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment