Land #10754, check_snake_case_filename redux

GSoC/Meterpreter_Web_Console
William Vu 2018-10-05 14:08:13 -05:00
commit 674dab05cc
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 1 additions and 2 deletions

View File

@ -256,8 +256,7 @@ class Msftidy
# This check also enforces namespace module name reversibility
def check_snake_case_filename
# TODO: Can we add the __ check to the look{ahead,behind}?
if @name !~ /^(?!_)[a-z0-9_]+(?<!_)\.rb$/ || @name.include?('__')
if @name !~ /^[a-z0-9]+(?:_[a-z0-9]+)*\.rb$/
warn('Filenames should be lowercase alphanumeric snake case.')
end
end