Land #4751, enable autofail on msftidy checks

Also, removes the datastore check from msftidy.

Fixes #3853, finally.
bug/bundler_fix
Tod Beardsley 2015-02-11 15:03:52 -06:00
commit ab42bad460
No known key found for this signature in database
GPG Key ID: BD63D0A3EA19CAAC
2 changed files with 4 additions and 11 deletions

View File

@ -11,11 +11,10 @@ matrix:
before_install:
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- rake --version
# Uncomment when we have fewer shipping msftidy warnings.
# Merge committers will still be checking, just not autofailing.
# - ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
# - ls -la ./.git/hooks
# - ./.git/hooks/post-merge
# Fail build if msftidy is not successful
- ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
- ls -la ./.git/hooks
- ./.git/hooks/post-merge
before_script:
- cp config/database.yml.travis config/database.yml
- bundle exec rake --version

View File

@ -531,12 +531,6 @@ class Msftidy
error("Writes to stdout", idx)
end
# You should not change datastore in code. See
# https://github.com/rapid7/metasploit-framework/issues/3853
if ln =~ /(?<!\.)datastore\[["'][^"']+["']\]\s*(=|<<)(?![=~>])/
info("datastore is modified in code with '#{Regexp.last_match(1)}': #{ln}", idx)
end
# do not read Set-Cookie header (ignore commented lines)
if ln =~ /^(?!\s*#).+\[['"]Set-Cookie['"]\](?!\s*=[^=~]+)/i
warn("Do not read Set-Cookie header directly, use res.get_cookies instead: #{ln}", idx)