diff options
author | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
commit | 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch) | |
tree | c3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/tasks/lint.rake | |
parent | f6453eca992a9c142268e78ac782cef98110d183 (diff) | |
download | gitlab-ce-tc-standard-gem.tar.gz |
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I
decided to try https://github.com/testdouble/standard on our codebase.
It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/tasks/lint.rake')
-rw-r--r-- | lib/tasks/lint.rake | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake index 5d673a1a285..6680bf0fb4a 100644 --- a/lib/tasks/lint.rake +++ b/lib/tasks/lint.rake @@ -1,7 +1,7 @@ unless Rails.env.production? namespace :lint do task :static_verification_env do - ENV['STATIC_VERIFICATION'] = 'true' + ENV["STATIC_VERIFICATION"] = "true" end desc "GitLab | lint | Static verification" @@ -14,16 +14,14 @@ unless Rails.env.production? desc "GitLab | lint | Lint JavaScript files using ESLint" task :javascript do - Rake::Task['eslint'].invoke + 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 + Rake::Task["haml_lint"].invoke + rescue RuntimeError # The haml_lint tasks raise a RuntimeError + exit(1) end desc "GitLab | lint | Run several lint checks" @@ -38,7 +36,7 @@ unless Rails.env.production? gettext:updated_check lint:static_verification ].each do |task| - pid = Process.fork do + pid = Process.fork { rd_out, wr_out = IO.pipe rd_err, wr_err = IO.pipe stdout = $stdout.dup @@ -65,7 +63,7 @@ unless Rails.env.production? IO.copy_stream(rd_out, $stdout) IO.copy_stream(rd_err, $stderr) end - end + } Process.waitpid(pid) status += $?.exitstatus |