Land #2606, better +x check for msftidy.

bug/bundler_fix
Tod Beardsley 2013-11-06 10:21:51 -06:00
commit 5b5ebd6cb5
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
1 changed files with 10 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class Msftidy
LONG_LINE_LENGTH = 200 # From 100 to 200 which is stupidly long
attr_reader :full_filepath, :source, :name
attr_reader :full_filepath, :source, :stat, :name
def initialize(source_file)
@full_filepath = source_file
@ -78,6 +78,12 @@ class Msftidy
#
##
def check_mode
unless (@stat.mode & 0111).zero?
warn("Module should not be marked executable")
end
end
def check_ref_identifiers
in_super = false
in_refs = false
@ -428,7 +434,8 @@ class Msftidy
def load_file(file)
f = open(file, 'rb')
buf = f.read(f.stat.size)
@stat = f.stat
buf = f.read(@stat.size)
f.close
return buf
end
@ -436,6 +443,7 @@ end
def run_checks(full_filepath)
tidy = Msftidy.new(full_filepath)
tidy.check_mode
tidy.check_ref_identifiers
tidy.check_old_keywords
tidy.check_verbose_option