summaryrefslogtreecommitdiff
path: root/lib/api/lint.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/api/lint.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-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/api/lint.rb')
-rw-r--r--lib/api/lint.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/lint.rb b/lib/api/lint.rb
index a7672021db0..a5995d6dcb3 100644
--- a/lib/api/lint.rb
+++ b/lib/api/lint.rb
@@ -3,20 +3,20 @@
module API
class Lint < Grape::API
namespace :ci do
- desc 'Validation of .gitlab-ci.yml content'
+ desc "Validation of .gitlab-ci.yml content"
params do
- requires :content, type: String, desc: 'Content of .gitlab-ci.yml'
+ requires :content, type: String, desc: "Content of .gitlab-ci.yml"
end
- post '/lint' do
+ post "/lint" do
error = Gitlab::Ci::YamlProcessor.validation_message(params[:content],
user: current_user)
status 200
if error.blank?
- { status: 'valid', errors: [] }
+ {status: "valid", errors: []}
else
- { status: 'invalid', errors: [error] }
+ {status: "invalid", errors: [error]}
end
end
end