diff --git a/tools/dev/msftidy.rb b/tools/dev/msftidy.rb index e469d7d9ea63..15cc049efa20 100755 --- a/tools/dev/msftidy.rb +++ b/tools/dev/msftidy.rb @@ -254,11 +254,11 @@ def line_has_require?(line, lib) line =~ /^\s*(require|load)\s+['"]#{lib}['"]/ end + # This check also enforces namespace module name reversibility 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." + # TODO: Can we add the __ check to the look{ahead,behind}? + if @name !~ /^(?!_)[a-z0-9_]+(?