Skip to content

Commit fa472c7

Browse files
committed
Merge pull request #2 from todb-r7/rubocop-is-optional
Rubocop checks are optional and info only
2 parents ab73c16 + 6898015 commit fa472c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/msftidy.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,13 @@ def check_extname
320320
end
321321
end
322322

323+
# Explicitly skip this check if we're suppressing info messages
324+
# anyway, since it takes a fair amount of time per module to perform.
323325
def check_rubocop
326+
return true if SUPPRESS_INFO_MESSAGES
324327
out = %x{rubocop -n #{@full_filepath}}
325328
ret = $?
326-
error("Fails to pass Rubocop Ruby style guidelines (run 'rubocop #{@full_filepath}' to see violations)") unless ret.exitstatus == 0
329+
info("Fails to pass Rubocop Ruby style guidelines (run 'rubocop #{@full_filepath}' to see violations)") unless ret.exitstatus == 0
327330
end
328331

329332
def check_old_rubies

0 commit comments

Comments
 (0)