Remove the broken SPOTCHECK_RECENT stuff
parent
eb2e4cbdef
commit
14b47aa67e
|
@ -4,14 +4,13 @@
|
|||
# Check (recursively) for style compliance violations and other
|
||||
# tree inconsistencies.
|
||||
#
|
||||
# by jduck and friends
|
||||
# by jduck, todb, and friends
|
||||
#
|
||||
require 'fileutils'
|
||||
require 'find'
|
||||
require 'time'
|
||||
|
||||
CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES']
|
||||
SPOTCHECK_RECENT = !!ENV['MSF_SPOTCHECK_RECENT']
|
||||
|
||||
if CHECK_OLD_RUBIES
|
||||
require 'rvm'
|
||||
|
@ -549,25 +548,12 @@ end
|
|||
|
||||
dirs = ARGV
|
||||
|
||||
if SPOTCHECK_RECENT
|
||||
msfbase = %x{\\git rev-parse --show-toplevel}.strip
|
||||
if File.directory? msfbase
|
||||
Dir.chdir(msfbase)
|
||||
else
|
||||
$stderr.puts "You need a git binary in your path to use this functionality."
|
||||
exit(0x02)
|
||||
end
|
||||
last_release = %x{\\git tag -l #{DateTime.now.year}\\*}.split.last
|
||||
new_modules = %x{\\git diff #{last_release}..HEAD --name-only --diff-filter A modules}
|
||||
dirs = dirs | new_modules.split
|
||||
end
|
||||
@exit_status = 0
|
||||
|
||||
# Don't print an error if there's really nothing to check.
|
||||
unless SPOTCHECK_RECENT
|
||||
if dirs.length < 1
|
||||
$stderr.puts "Usage: #{File.basename(__FILE__)} <directory or file>"
|
||||
exit(0x01)
|
||||
end
|
||||
if dirs.length < 1
|
||||
$stderr.puts "Usage: #{File.basename(__FILE__)} <directory or file>"
|
||||
@exit_status = 1
|
||||
exit(@exit_status)
|
||||
end
|
||||
|
||||
dirs.each do |dir|
|
||||
|
|
Loading…
Reference in New Issue