Enable Lint/StringConversionInInterpolation rubocop rule

To prevent redundant `to_s` like https://github.com/rails/rails/pull/32923#discussion_r189460008
automatically in the future.
This commit is contained in:
Ryuta Kamizono 2018-05-21 21:04:01 +09:00
parent 15d00f04f4
commit a77447f4da
4 changed files with 7 additions and 4 deletions

@ -162,6 +162,9 @@ Style/UnneededPercentQ:
Lint/RequireParentheses:
Enabled: true
Lint/StringConversionInInterpolation:
Enabled: true
Style/RedundantReturn:
Enabled: true
AllowMultipleReturnValues: true

@ -104,7 +104,7 @@ def log_query_source
if source_line
if defined?(::Rails.root)
app_root = "#{::Rails.root.to_s}/".freeze
app_root = "#{::Rails.root}/"
source_line = source_line.sub(app_root, "")
end

@ -51,11 +51,11 @@ def columns(name, message = nil)
end
def quote_table_name(name)
"\"#{name.to_s}\""
"\"#{name}\""
end
def quote_column_name(name)
"\"#{name.to_s}\""
"\"#{name}\""
end
def schema_cache

@ -36,7 +36,7 @@ def teardown
skip "PTY unavailable" unless available_pty?
File.open("#{app_path}/config/boot.rb", "w") do |f|
f.puts "ENV['BUNDLE_GEMFILE'] = '#{Bundler.default_gemfile.to_s}'"
f.puts "ENV['BUNDLE_GEMFILE'] = '#{Bundler.default_gemfile}'"
f.puts "require 'bundler/setup'"
end