Skip to content

Commit 0122f09

Browse files
committed
Fix jt rubocop to only check the given CLI arguments
1 parent ae1245e commit 0122f09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tool/jt.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,10 @@ def rubocop(*args)
19611961
"GEM_PATH" => gem_home,
19621962
"PATH" => "#{gem_home}/bin:#{ENV['PATH']}"
19631963
}
1964-
sh env, "ruby", "#{gem_home}/bin/rubocop", *RUBOCOP_INCLUDE_LIST, *args
1964+
if args.empty? or args.all? { |arg| arg.start_with?('-') }
1965+
args += RUBOCOP_INCLUDE_LIST
1966+
end
1967+
sh env, "ruby", "#{gem_home}/bin/rubocop", *args
19651968
end
19661969

19671970
def check_filename_length

0 commit comments

Comments
 (0)