aboutsummaryrefslogtreecommitdiffstats
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorDillon Welch <daw0328@gmail.com>2018-03-29 19:29:55 -0700
committerDillon Welch <daw0328@gmail.com>2018-07-23 15:37:06 -0700
commitd108288c2f684233298f97f18ac00de0b016deaa (patch)
tree0656fd6f20d662d854a3fc93e80dfbc0baec063d /.rubocop.yml
parenta4398e412c042b297039cc216f6536b0c048bd9c (diff)
downloadrails-d108288c2f684233298f97f18ac00de0b016deaa.tar.gz
rails-d108288c2f684233298f97f18ac00de0b016deaa.tar.bz2
rails-d108288c2f684233298f97f18ac00de0b016deaa.zip
Turn on performance based cops
Use attr_reader/attr_writer instead of methods method is 12% slower Use flat_map over map.flatten(1) flatten is 66% slower Use hash[]= instead of hash.merge! with single arguments merge! is 166% slower See https://github.com/rails/rails/pull/32337 for more conversation
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 3e3b963a47..d1e8f03f13 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -179,3 +179,12 @@ Style/Semicolon:
# Prefer Foo.method over Foo::method
Style/ColonMethodCall:
Enabled: true
+
+Style/TrivialAccessors:
+ Enabled: true
+
+Performance/FlatMap:
+ Enabled: true
+
+Performance/RedundantMerge:
+ Enabled: true