Skip to content

Commit 81a9808

Browse files
author
Tod Beardsley
committed
Rubocop checks are optional and info only
I like the change but it means that basically everything will fail forever until we tweak up the config.
1 parent ab73c16 commit 81a9808

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/msftidy.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
require 'time'
1212

1313
CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES']
14+
CHECK_RUBOCOP = !!ENV['MSF_CHECK_RUBOCOP']
1415
SUPPRESS_INFO_MESSAGES = !!ENV['MSF_SUPPRESS_INFO_MESSAGES']
1516

1617
if CHECK_OLD_RUBIES
@@ -321,9 +322,10 @@ def check_extname
321322
end
322323

323324
def check_rubocop
325+
return true unless CHECK_RUBOCOP
324326
out = %x{rubocop -n #{@full_filepath}}
325327
ret = $?
326-
error("Fails to pass Rubocop Ruby style guidelines (run 'rubocop #{@full_filepath}' to see violations)") unless ret.exitstatus == 0
328+
info("Fails to pass Rubocop Ruby style guidelines (run 'rubocop #{@full_filepath}' to see violations)") unless ret.exitstatus == 0
327329
end
328330

329331
def check_old_rubies

0 commit comments

Comments
 (0)