Add msftidy check for snake_case.rb filenames

bug/bundler_fix
Tod Beardsley 2013-09-12 16:06:17 -05:00
parent 76f27ecde8
commit cf27b0b457
1 changed files with 9 additions and 0 deletions

View File

@ -121,6 +121,14 @@ class Msftidy
end
end
def check_snake_case_filename
sep = File::SEPARATOR
good_name = Regexp.new "^[a-z0-9_#{sep}]+\.rb$"
unless @name =~ good_name
warn "Filenames should be alphanum and snake case."
end
end
def check_old_keywords
max_count = 10
counter = 0
@ -408,6 +416,7 @@ def run_checks(f_rel)
tidy.check_bad_terms
tidy.check_function_basics
tidy.check_lines
tidy.check_snake_case_filename
end
##