Fix DisclosureDate regex, and avoid checking Rank naming style
This commit is contained in:
parent
ceb4888772
commit
1d71aec916
|
@ -71,7 +71,7 @@ def check_single_file(dparts, fparts, f_rel)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check disclosure date format
|
# Check disclosure date format
|
||||||
if content =~ /'DisclosureDate' => '(.+)'/
|
if content =~ /'DisclosureDate' => ['|\"](.+)['|\"]/
|
||||||
d = $1 #Captured date
|
d = $1 #Captured date
|
||||||
# Flag if overall format is wrong
|
# Flag if overall format is wrong
|
||||||
if d =~ /^... \d{1,2} \d{4}/
|
if d =~ /^... \d{1,2} \d{4}/
|
||||||
|
@ -115,7 +115,7 @@ def check_single_file(dparts, fparts, f_rel)
|
||||||
|
|
||||||
vars = content.scan(/([\x20|\w]+) \= [\'|\"]*\w[\'|\"]*/).flatten
|
vars = content.scan(/([\x20|\w]+) \= [\'|\"]*\w[\'|\"]*/).flatten
|
||||||
vars.each do |v|
|
vars.each do |v|
|
||||||
next if v =~ /^var/
|
next if v =~ /^var/ or v =~ /^Rank/
|
||||||
if v =~ /[a-z][A-Z]/ or v =~ /[A-Z][a-z]/
|
if v =~ /[a-z][A-Z]/ or v =~ /[A-Z][a-z]/
|
||||||
show_missing(f, "WARNING: Poor variable naming style for: '#{v}'", false)
|
show_missing(f, "WARNING: Poor variable naming style for: '#{v}'", false)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue