summaryrefslogtreecommitdiff
path: root/lib/tasks/lint.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/lint.rake')
-rw-r--r--lib/tasks/lint.rake23
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake
index 8b86a5c72a5..006fcdd31a4 100644
--- a/lib/tasks/lint.rake
+++ b/lib/tasks/lint.rake
@@ -17,16 +17,26 @@ 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
+ gettext:updated_check
lint:static_verification
].each do |task|
pid = Process.fork do
@@ -38,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)