summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-11 12:46:33 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-11 12:46:33 -0700
commit95d0af0a2be2ac1fb67bd6b5fb0cb99e41b14064 (patch)
treee3990be027010fb644aff2c9e8537e786e73c32d
parentb8173c1103eeb76d7de1a7871d649c395820c5c5 (diff)
downloadohai-rubocop_performance.tar.gz
Use rubocop-performance to enforce some best practicesrubocop_performance
I've already fixed all the warnings. This will keep it that way. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--.rubocop.yml5
-rw-r--r--Gemfile1
2 files changed, 6 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 5a772c5f..425a9e8c 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,3 +1,5 @@
+require: rubocop-performance
+
AllCops:
TargetRubyVersion: 2.5
Exclude:
@@ -10,3 +12,6 @@ Layout/IndentationStyle:
Exclude:
- "lib/ohai/plugins/mono.rb"
- "lib/ohai/plugins/darwin/hardware.rb"
+
+Performance/Caller:
+ Enabled: false \ No newline at end of file
diff --git a/Gemfile b/Gemfile
index fd738a71..1c57ed65 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,6 +5,7 @@ gemspec
# NOTE: do not submit PRs to add pry as a dep, add to your Gemfile.local
group :development do
gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
+ gem "rubocop-performance", "1.7.1"
gem "rake", ">= 10.1.0"
gem "rspec-core", "~> 3.0"
gem "rspec-expectations", "~> 3.0"