Commit da6e2ae8 authored by Robert May's avatar Robert May

Exclude lib/gitlab/danger from JSON cop

These files are prone to double-loading but also don't include
the Rails environment, causing warnings around constants.
parent 1d35e510
......@@ -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
......
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