Skip to content

Commit

Permalink
Specify -c .rubocop.yml for bin/rubocop
Browse files Browse the repository at this point in the history
This avoids the problem where an existing .rubocop.yml is found
in the user's home directory that causes errors or misconfiguration.

It also speeds up the run by about 13%, presumably because it doesn't
need to look for the right config file.
  • Loading branch information
martinemde committed Aug 22, 2023
1 parent 0339622 commit a421ced
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/rubocop
Expand Up @@ -6,4 +6,6 @@ $LOAD_PATH.unshift(File.expand_path("../bundler/lib", __dir__))
ENV["BUNDLE_GEMFILE"] = File.expand_path("../tool/bundler/lint_gems.rb", __dir__)
require "bundler/setup"

ARGV.unshift("--config", ".rubocop.yml")

load Gem.bin_path("rubocop", "rubocop")

0 comments on commit a421ced

Please sign in to comment.