Skip to content

Commit ab42bad

Browse files
author
Tod Beardsley
committed
Land rapid7#4751, enable autofail on msftidy checks
Also, removes the datastore check from msftidy. Fixes rapid7#3853, finally.
2 parents 2397be6 + 9b2fad2 commit ab42bad

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ matrix:
1111
before_install:
1212
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
1313
- rake --version
14-
# Uncomment when we have fewer shipping msftidy warnings.
15-
# Merge committers will still be checking, just not autofailing.
16-
# - ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
17-
# - ls -la ./.git/hooks
18-
# - ./.git/hooks/post-merge
14+
# Fail build if msftidy is not successful
15+
- ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
16+
- ls -la ./.git/hooks
17+
- ./.git/hooks/post-merge
1918
before_script:
2019
- cp config/database.yml.travis config/database.yml
2120
- bundle exec rake --version

tools/msftidy.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -531,12 +531,6 @@ def check_lines
531531
error("Writes to stdout", idx)
532532
end
533533

534-
# You should not change datastore in code. See
535-
# https://github.com/rapid7/metasploit-framework/issues/3853
536-
if ln =~ /(?<!\.)datastore\[["'][^"']+["']\]\s*(=|<<)(?![=~>])/
537-
info("datastore is modified in code with '#{Regexp.last_match(1)}': #{ln}", idx)
538-
end
539-
540534
# do not read Set-Cookie header (ignore commented lines)
541535
if ln =~ /^(?!\s*#).+\[['"]Set-Cookie['"]\](?!\s*=[^=~]+)/i
542536
warn("Do not read Set-Cookie header directly, use res.get_cookies instead: #{ln}", idx)

0 commit comments

Comments
 (0)