From 14b47aa67e1a60a7a8bd3ab31ba2b521f8243f80 Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Wed, 2 Apr 2014 11:12:00 -0500 Subject: [PATCH] Remove the broken SPOTCHECK_RECENT stuff --- tools/msftidy.rb | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/tools/msftidy.rb b/tools/msftidy.rb index b5501c2ce2..a379240394 100755 --- a/tools/msftidy.rb +++ b/tools/msftidy.rb @@ -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__)} " - exit(0x01) - end +if dirs.length < 1 + $stderr.puts "Usage: #{File.basename(__FILE__)} " + @exit_status = 1 + exit(@exit_status) end dirs.each do |dir|