Land #4751, enable autofail on msftidy checks
Also, removes the datastore check from msftidy. Fixes #3853, finally.bug/bundler_fix
commit
ab42bad460
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue