Stop being an idiot about the regex and rewrite it
There was no reason to shoehorn in zero-length assertions.GSoC/Meterpreter_Web_Console
parent
40cb09b2e2
commit
2186322134
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue