Skip to content
Snippets Groups Projects
Commit bca922fd authored by Jan Viljanen's avatar Jan Viljanen
Browse files

rubocop: only use config if style is testing specified file(s)

parent 711bb497
No related branches found
No related tags found
No related merge requests found
......@@ -60,13 +60,10 @@ module Homebrew
has_non_formula = Array(files).any? do |file|
File.expand_path(file).start_with? HOMEBREW_LIBRARY_PATH
end
config_file = if files.nil? || has_non_formula
HOMEBREW_LIBRARY_PATH/".rubocop.yml"
else
HOMEBREW_LIBRARY/".rubocop_audit.yml"
end
args << "--config" << config_file
unless files.nil? || has_non_formula
args << "--config" << HOMEBREW_LIBRARY/".rubocop_audit.yml"
end
if files.nil?
args << HOMEBREW_LIBRARY_PATH
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment