Skip to content

Commit cf75554

Browse files
committed
Land rapid7#4621, msftidy whitelist constant
Now I'm happy... almost.
2 parents a52f491 + bbe9fc2 commit cf75554

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

tools/msftidy.rb

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212

1313
CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES']
1414
SUPPRESS_INFO_MESSAGES = !!ENV['MSF_SUPPRESS_INFO_MESSAGES']
15+
TITLE_WHITELIST = %w{
16+
a an and as at avserve callmenum configdir connect debug docbase dtspcd
17+
execve file for from getinfo goaway gsad hetro historysearch htpasswd ibstat
18+
id in inetd iseemedia jhot libxslt lmgrd lnk load main map migrate mimencode
19+
multisort name net netcat nodeid ntpd nttrans of on onreadystatechange or
20+
ovutil path pbot pfilez pgpass pingstr pls popsubfolders prescan readvar
21+
relfile rev rexec rlogin rsh rsyslog sa sadmind say sblistpack spamd
22+
sreplace tagprinter the tnftp to twikidraw udev uplay user username via
23+
welcome with ypupdated zsudo
24+
}
1525

1626
if CHECK_OLD_RUBIES
1727
require 'rvm'
@@ -419,21 +429,10 @@ def check_disclosure_date
419429
end
420430

421431
def check_title_casing
422-
whitelist = %w{
423-
a an and as at avserve callmenum configdir connect debug docbase dtspcd
424-
execve file for from getinfo goaway gsad hetro historysearch htpasswd
425-
ibstat id in inetd iseemedia jhot libxslt lmgrd lnk load main map
426-
migrate mimencode multisort name net netcat nodeid ntpd nttrans of
427-
on onreadystatechange or ovutil path pbot pfilez pgpass pingstr pls
428-
popsubfolders prescan readvar relfile rev rexec rlogin rsh rsyslog sa
429-
sadmind say sblistpack spamd sreplace tagprinter the to twikidraw udev
430-
uplay user username via welcome with ypupdated zsudo
431-
}
432-
433432
if @source =~ /["']Name["'][[:space:]]*=>[[:space:]]*['"](.+)['"],*$/
434433
words = $1.split
435434
words.each do |word|
436-
if whitelist.include?(word)
435+
if TITLE_WHITELIST.include?(word)
437436
next
438437
elsif word =~ /^[a-z]+$/
439438
warn("Suspect capitalization in module title: '#{word}'")

0 commit comments

Comments
 (0)