Skip to content

Commit 0e92b94

Browse files
committed
Run RuboCop on spec/truffle specs
* Using the ruby/spec configuration, as .rubocop.yml doesn't work well for specs.
1 parent 8b46386 commit 0e92b94

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,9 @@ def rubocop(*args)
19611961
"GEM_PATH" => gem_home,
19621962
"PATH" => "#{gem_home}/bin:#{ENV['PATH']}"
19631963
}
1964-
if args.empty? or args.all? { |arg| arg.start_with?('-') }
1964+
if i = args.index('--specs')
1965+
args[i..i] = %w[-c spec/ruby/.rubocop.yml spec/truffle]
1966+
elsif args.empty? or args.all? { |arg| arg.start_with?('-') }
19651967
args += RUBOCOP_INCLUDE_LIST
19661968
end
19671969
sh env, "ruby", "#{gem_home}/bin/rubocop", *args
@@ -2031,6 +2033,7 @@ def lint(*args)
20312033
check_dsl_usage unless args.delete '--no-build'
20322034
check_filename_length
20332035
rubocop
2036+
rubocop('--specs')
20342037
sh "tool/lint.sh"
20352038
checkstyle
20362039
check_parser

0 commit comments

Comments
 (0)