diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-22 21:07:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-22 21:07:44 +0300 |
commit | d0f16d56f3716d4a60027eb261f12080094f8db3 (patch) | |
tree | f9ecf9f4bda6d761f612bc4a5efb701b7c6b3d2d /rubocop | |
parent | 68aa32736b50c3609348f3bf740b81a2dfd1fb25 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/gitlab/json.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rubocop/cop/gitlab/json.rb b/rubocop/cop/gitlab/json.rb index cf2ed0ba536..8b10850b894 100644 --- a/rubocop/cop/gitlab/json.rb +++ b/rubocop/cop/gitlab/json.rb @@ -6,9 +6,9 @@ module RuboCop class Json < RuboCop::Cop::Base extend RuboCop::Cop::AutoCorrector - MSG = <<~EOL + MSG = <<~TEXT Prefer `Gitlab::Json` over calling `JSON` directly. See https://docs.gitlab.com/ee/development/json.html - EOL + TEXT AVAILABLE_METHODS = %i[parse parse! load decode dump generate encode pretty_generate].to_set.freeze @@ -41,7 +41,7 @@ module RuboCop end def cbased(node) - return unless %r{/ee/}.match?(node.location.expression.source_buffer.name) + return unless node.location.expression.source_buffer.name.include?('/ee/') "::" end |