Skip to content

Commit efebaae

Browse files
author
Tod Beardsley
committed
Make the title whitelist a constant
1 parent 2cc44cc commit efebaae

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+
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
18+
ibstat id in inetd iseemedia jhot libxslt lmgrd lnk load main map
19+
migrate mimencode multisort name net netcat nodeid ntpd nttrans of
20+
on onreadystatechange or ovutil path pbot pfilez pgpass pingstr pls
21+
popsubfolders prescan readvar relfile rev rexec rlogin rsh rsyslog sa
22+
sadmind say sblistpack spamd sreplace tagprinter the to twikidraw udev
23+
uplay user username via 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 WHITELIST.include?(word)
437436
next
438437
elsif word =~ /^[a-z]+$/
439438
warn("Suspect capitalization in module title: '#{word}'")

0 commit comments

Comments
 (0)