1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-29 18:07:27 +01:00

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.
This commit is contained in:
Tod Beardsley 2014-07-16 10:26:35 -05:00
parent ab73c16d0d
commit 81a98081d9
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193

View File

@ -11,6 +11,7 @@ require 'find'
require 'time'
CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES']
CHECK_RUBOCOP = !!ENV['MSF_CHECK_RUBOCOP']
SUPPRESS_INFO_MESSAGES = !!ENV['MSF_SUPPRESS_INFO_MESSAGES']
if CHECK_OLD_RUBIES
@ -321,9 +322,10 @@ class Msftidy
end
def check_rubocop
return true unless CHECK_RUBOCOP
out = %x{rubocop -n #{@full_filepath}}
ret = $?
error("Fails to pass Rubocop Ruby style guidelines (run 'rubocop #{@full_filepath}' to see violations)") unless ret.exitstatus == 0
info("Fails to pass Rubocop Ruby style guidelines (run 'rubocop #{@full_filepath}' to see violations)") unless ret.exitstatus == 0
end
def check_old_rubies