Avoid checking var naming style if it's a JavaScript variable

unstable
sinn3r 2012-02-18 17:58:36 -06:00
parent 42cf21acfe
commit ce356402d0
1 changed files with 2 additions and 1 deletions

View File

@ -113,8 +113,9 @@ def check_single_file(dparts, fparts, f_rel)
end
end
vars = content.scan(/(\w+) \=\~* [\'|\"]*\w[\'|\"]*/).flatten
vars = content.scan(/([\x20|\w]+) \= [\'|\"]*\w[\'|\"]*/).flatten
vars.each do |v|
next if v =~ /^var/
if v =~ /[a-z][A-Z]/ or v =~ /[A-Z][a-z]/
show_missing(f, "WARNING: Poor variable naming style for: '#{v}'", false)
end