aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2017-07-02 14:45:29 +0100
committerGitHub2017-07-02 14:45:29 +0100
commit2b3717a5a0452271bb7dcfcdfa2680714ac99c2a (patch)
treeffb54dbcf971a4fd9fea527c439ca286010e9445 /Library/Homebrew/cmd
parenteb110e94f002966ffb241e49ca6154fdae601362 (diff)
parente6938d920165e3be872366216d618ca01da83fbb (diff)
downloadbrew-2b3717a5a0452271bb7dcfcdfa2680714ac99c2a.tar.bz2
Merge pull request #2842 from GauthamGoli/audit_only_cops_option
audit: Don't run audit methods when `--only-cops` option is passed
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/style.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb
index c6201e371..51937c3e5 100644
--- a/Library/Homebrew/cmd/style.rb
+++ b/Library/Homebrew/cmd/style.rb
@@ -94,7 +94,11 @@ module Homebrew
RuboCop::Cop::Cop.registry.departments.include?(cop.to_sym)
end
- args << "--only" << cops_to_include.join(",") unless cops_to_include.empty?
+ if cops_to_include.empty?
+ odie "RuboCops #{options[:only_cops].join(",")} were not found"
+ end
+
+ args << "--only" << cops_to_include.join(",")
end
if files.nil?