Merge pull request #40436 from kamipo/enable_space_around_operators

Re-enable `Layout/SpaceAroundOperators` cop
This commit is contained in:
Ryuta Kamizono 2020-10-23 20:40:34 +09:00 committed by GitHub
commit 533c5c3a53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 30 deletions

View File

@ -119,6 +119,9 @@ Layout/SpaceAroundEqualsInParameterDefault:
Layout/SpaceAroundKeyword:
Enabled: true
Layout/SpaceAroundOperators:
Enabled: true
Layout/SpaceBeforeComma:
Enabled: true

View File

@ -370,7 +370,7 @@ GEM
mini_portile2 (~> 2.4.0)
os (1.1.1)
parallel (1.19.2)
parser (2.7.1.4)
parser (2.7.2.0)
ast (~> 2.4.1)
path_expander (1.1.0)
pg (1.2.3)
@ -410,7 +410,7 @@ GEM
rdoc (6.2.1)
redcarpet (3.2.3)
redis (4.2.2)
regexp_parser (1.7.1)
regexp_parser (1.8.2)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
@ -429,25 +429,26 @@ GEM
retriable (3.1.2)
rexml (3.2.4)
rouge (3.20.0)
rubocop (0.90.0)
rubocop (1.0.0)
parallel (~> 1.10)
parser (>= 2.7.1.1)
parser (>= 2.7.1.5)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.3.0, < 1.0)
rubocop-ast (>= 0.6.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.3.0)
parser (>= 2.7.1.4)
rubocop-packaging (0.4.0)
rubocop (~> 0.89)
rubocop-performance (1.6.1)
rubocop (>= 0.71.0)
rubocop-rails (2.5.2)
activesupport
rubocop-ast (1.0.1)
parser (>= 2.7.1.5)
rubocop-packaging (0.5.1)
rubocop (>= 0.89, < 2.0)
rubocop-performance (1.8.1)
rubocop (>= 0.87.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.8.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.72.0)
rubocop (>= 0.87.0)
ruby-progressbar (1.10.1)
ruby-vips (2.0.17)
ffi (~> 1.9)

View File

@ -34,7 +34,7 @@ module ActionDispatch
from = state_id[s]
if u.all? { |pos| pos == DUMMY }
to = state_id[Object.new]
to = state_id[Object.new]
dtrans[from, to] = sym
dtrans.add_accepting(to)

View File

@ -24,7 +24,7 @@ module ActionDispatch
private
def actionable_request?(request)
request.get_header("action_dispatch.show_detailed_exceptions") && request.post? && request.path == endpoint
request.get_header("action_dispatch.show_detailed_exceptions") && request.post? && request.path == endpoint
end
def redirect_to(location)

View File

@ -75,7 +75,7 @@ module ActiveModel
usec = $7.to_i
usec_len = $7&.length
if usec_len&.< 6
usec *= 10 ** (6 - usec_len)
usec *= 10**(6 - usec_len)
end
if $8

View File

@ -40,7 +40,7 @@ module ActiveRecord
config = {
"default_env" => {
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary_shard_one" => { "adapter" => "sqlite3", "database" => "test/db/primary_shard_one.sqlite3" },
}
}
@ -73,8 +73,8 @@ module ActiveRecord
config = {
"default_env" => {
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3", "replica" => true },
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3", "replica" => true },
"primary_shard_one" => { "adapter" => "sqlite3", "database" => "test/db/primary_shard_one.sqlite3" },
"primary_shard_one_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary_shard_one.sqlite3", "replica" => true }
}
@ -117,8 +117,8 @@ module ActiveRecord
config = {
"default_env" => {
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3", "replica" => true },
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3", "replica" => true },
"primary_shard_one" => { "adapter" => "sqlite3", "database" => "test/db/primary_shard_one.sqlite3" },
"primary_shard_one_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary_shard_one.sqlite3", "replica" => true }
}
@ -185,8 +185,8 @@ module ActiveRecord
config = {
"default_env" => {
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3", "replica" => true },
"primary" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3" },
"primary_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary.sqlite3", "replica" => true },
"primary_shard_one" => { "adapter" => "sqlite3", "database" => "test/db/primary_shard_one.sqlite3" },
"primary_shard_one_replica" => { "adapter" => "sqlite3", "database" => "test/db/primary_shard_one.sqlite3", "replica" => true }
}

View File

@ -57,13 +57,13 @@ class DatabaseConfigurationsTest < ActiveRecord::TestCase
def test_find_db_config_returns_first_config_for_env
config = ActiveRecord::DatabaseConfigurations.new({
"test" => {
"config_1"=> {
"config_1" => {
"database" => "db"
},
"config_2"=> {
"config_2" => {
"database" => "db"
},
"config_3"=> {
"config_3" => {
"database" => "db"
},
}

View File

@ -1291,7 +1291,7 @@ module ActiveRecord
def test_charset_current
old_configurations = ActiveRecord::Base.configurations
configurations = {
"production" => { "database" => "prod-db" }
"production" => { "database" => "prod-db" }
}
ActiveRecord::Base.configurations = configurations
@ -1324,7 +1324,7 @@ module ActiveRecord
def test_collation_current
old_configurations = ActiveRecord::Base.configurations
configurations = {
"production" => { "database" => "prod-db" }
"production" => { "database" => "prod-db" }
}
ActiveRecord::Base.configurations = configurations