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:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-06-19 20:13:11 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-20 15:57:47 +0300
commitfff6b89f0f51709e5c58be11e6b98e638383c678 (patch)
tree22394fe159c62025834b0b048699cc3292bf36c5 /lib/tasks/lint.rake
parentc815abbdc06fd37463b1383160a2aa1812729f4d (diff)
More verbose errors in static-analysis
This makes the output in static analysis a bit more verbose.
Diffstat (limited to 'lib/tasks/lint.rake')
-rw-r--r--lib/tasks/lint.rake22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake
index b5a9cddaacb..006fcdd31a4 100644
--- a/lib/tasks/lint.rake
+++ b/lib/tasks/lint.rake
@@ -17,13 +17,22 @@ unless Rails.env.production?
Rake::Task['eslint'].invoke
end
+ desc "GitLab | lint | Lint HAML files"
+ task :haml do
+ begin
+ Rake::Task['haml_lint'].invoke
+ rescue RuntimeError # The haml_lint tasks raise a RuntimeError
+ exit(1)
+ end
+ end
+
desc "GitLab | lint | Run several lint checks"
task :all do
status = 0
%w[
config_lint
- haml_lint
+ lint:haml
scss_lint
flay
gettext:lint
@@ -39,13 +48,12 @@ unless Rails.env.production?
$stderr.reopen(wr_err)
begin
- begin
- Rake::Task[task].invoke
- rescue RuntimeError # The haml_lint tasks raise a RuntimeError
- exit(1)
- end
+ Rake::Task[task].invoke
rescue SystemExit => ex
- msg = "*** Rake task #{task} failed with the following error(s):"
+ msg = "*** Rake task #{task} exited:"
+ raise ex
+ rescue => ex
+ msg = "*** Rake task #{task} raised #{ex.class}:"
raise ex
ensure
$stdout.reopen(stdout)