Commit a99cfe85 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-json-double-load' into 'master'

Exclude lib/gitlab/danger from JSON cop

Closes #217335

See merge request gitlab-org/gitlab!32534
parents ca34500c 69ec4838
......@@ -225,6 +225,7 @@ Gitlab/Json:
- 'scripts/**/*'
- 'lib/rspec_flaky/**/*'
- 'lib/quality/**/*'
- 'lib/gitlab/danger/**/*'
GitlabSecurity/PublicSend:
Enabled: true
......
# frozen_string_literal: true
require_relative '../json'
require 'json'
module Gitlab
module Danger
......@@ -25,8 +25,8 @@ module Gitlab
)}x.freeze
def initialize
names = Gitlab::Json.parse(File.read(DIGESTS)).keys +
Gitlab::Json.parse(File.read(ALIASES)).keys
names = JSON.parse(File.read(DIGESTS)).keys +
JSON.parse(File.read(ALIASES)).keys
@emoji = names.map { |name| ":#{name}:" }
end
......
......@@ -16,7 +16,7 @@ module Gitlab
raise HTTPError, "Failed to read #{url}: #{rsp.code} #{rsp.message}"
end
Gitlab::Json.parse(rsp.body)
JSON.parse(rsp.body)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment