Skip to content

Inconsistent reporting for FeatureEnvy #1337

Closed
@klobuczek

Description

@klobuczek

The following code

class << self
  def normalize_path(scope, path)
    path_desc = new(scope)
    path_desc.increment(path.shift) while path_desc.next? && path.present?
    path_desc if path.empty?
  end
end

raises JsonapiExt::Scoping::Include::PathDescriptor#normalize_path refers to 'path' more than self (maybe move it to another class?)

however, if I rewrite it to:

def self.normalize_path(scope, path)
  path_desc = new(scope)
  path_desc.increment(path.shift) while path_desc.next? && path.present?
  path_desc if path.empty?
end

it does not.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions