Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standalone Brakeman #46

Merged
merged 1 commit into from Oct 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 2 additions & 11 deletions lib/tasks/rubocop-ci.rake
Expand Up @@ -8,7 +8,6 @@ require 'scss_lint/rake_task'
require 'coffeelint'
require 'slim_lint'
require 'slim_lint/rake_task'
require 'brakeman'

rubocop_config = nil

Expand Down Expand Up @@ -90,16 +89,8 @@ if Dir.exist?('app')
end

task :rubocop do
result = Brakeman.run(app_path: '.', exit_on_warn: true)
ignored = result.ignored_filter&.ignored_warnings || []
errors = result.errors + result.warnings - ignored

if errors.empty?
puts 'Brakeman OK'
else
puts result.report.to_s
raise 'Brakeman Errors'
end
success = system('bundle exec brakeman --no-pager')
raise 'Brakeman Errors' unless success
end

task :rubocop do
Expand Down