Commit e4990b66 authored by Rémy Coutable's avatar Rémy Coutable

Combine all rake tasks in the static-analysis job

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7294bc80
......@@ -16,5 +16,33 @@ unless Rails.env.production?
task :javascript do
Rake::Task['eslint'].invoke
end
desc "GitLab | lint | Run several lint checks"
task :all do
status = 0
original_stdout = $stdout
%w[
config_lint
haml_lint
scss_lint
flay
gettext:lint
lint:static_verification
].each do |task|
begin
$stdout = StringIO.new
Rake::Task[task].invoke
rescue RuntimeError, SystemExit => ex
raise ex if ex.is_a?(RuntimeError) && task != 'haml_lint'
original_stdout << $stdout.string
status = 1
ensure
$stdout = original_stdout
end
end
exit status
end
end
end
......@@ -26,15 +26,10 @@ def emit_errors(static_analysis)
end
tasks = [
%w[bundle exec rake config_lint],
%w[bundle exec rake flay],
%w[bundle exec rake haml_lint],
%w[bundle exec rake scss_lint],
%w[bin/rake lint:all],
%w[bundle exec license_finder],
%w[yarn run eslint],
%w[bundle exec rubocop --parallel],
%w[bundle exec rake gettext:lint],
%w[bundle exec rake lint:static_verification],
%w[scripts/lint-conflicts.sh],
%w[scripts/lint-rugged]
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment