Remove the broken SPOTCHECK_RECENT stuff
parent
eb2e4cbdef
commit
14b47aa67e
|
@ -4,14 +4,13 @@
|
||||||
# Check (recursively) for style compliance violations and other
|
# Check (recursively) for style compliance violations and other
|
||||||
# tree inconsistencies.
|
# tree inconsistencies.
|
||||||
#
|
#
|
||||||
# by jduck and friends
|
# by jduck, todb, and friends
|
||||||
#
|
#
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'find'
|
require 'find'
|
||||||
require 'time'
|
require 'time'
|
||||||
|
|
||||||
CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES']
|
CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES']
|
||||||
SPOTCHECK_RECENT = !!ENV['MSF_SPOTCHECK_RECENT']
|
|
||||||
|
|
||||||
if CHECK_OLD_RUBIES
|
if CHECK_OLD_RUBIES
|
||||||
require 'rvm'
|
require 'rvm'
|
||||||
|
@ -549,25 +548,12 @@ end
|
||||||
|
|
||||||
dirs = ARGV
|
dirs = ARGV
|
||||||
|
|
||||||
if SPOTCHECK_RECENT
|
@exit_status = 0
|
||||||
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
|
|
||||||
|
|
||||||
# Don't print an error if there's really nothing to check.
|
if dirs.length < 1
|
||||||
unless SPOTCHECK_RECENT
|
$stderr.puts "Usage: #{File.basename(__FILE__)} <directory or file>"
|
||||||
if dirs.length < 1
|
@exit_status = 1
|
||||||
$stderr.puts "Usage: #{File.basename(__FILE__)} <directory or file>"
|
exit(@exit_status)
|
||||||
exit(0x01)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
dirs.each do |dir|
|
dirs.each do |dir|
|
||||||
|
|
Loading…
Reference in New Issue