Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-01-26 17:23:46 +0300
committerRémy Coutable <remy@rymai.me>2018-02-14 17:18:59 +0300
commite4990b66df64f2e23502d161f411335c9a771a43 (patch)
tree94fa4b0ffd2d79a96f8d1a7a68fbb19aceb60ff2
parent7294bc80c373356ab77f9822c22a0330323b73d9 (diff)
Combine all rake tasks in the static-analysis job
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--lib/tasks/lint.rake28
-rwxr-xr-xscripts/static-analysis7
2 files changed, 29 insertions, 6 deletions
diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake
index 3ab406eff2c..e7812ff3568 100644
--- a/lib/tasks/lint.rake
+++ b/lib/tasks/lint.rake
@@ -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
diff --git a/scripts/static-analysis b/scripts/static-analysis
index bdb88f3cb57..db4df4ee6cb 100755
--- a/scripts/static-analysis
+++ b/scripts/static-analysis
@@ -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]
]