cyberark/conjur-api-ruby

View on GitHub
lib/conjur/id.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
86%

Conjur::Id#as_json has unused parameter 'options'
Open

    def as_json options={}
Severity: Minor
Found in lib/conjur/id.rb by reek

Unused Parameter refers to methods with parameters that are unused in scope of the method.

Having unused parameters in a method is code smell because leaving dead code in a method can never improve the method and it makes the code confusing to read.

Example

Given:

class Klass
  def unused_parameters(x,y,z)
    puts x,y # but not z
  end
end

Reek would emit the following warning:

[2]:Klass#unused_parameters has unused parameter 'z' (UnusedParameters)

Shadowing outer local variable - id.
Open

      Array(id).join(':').tap do |id|
Severity: Minor
Found in lib/conjur/id.rb by rubocop

This cop looks for use of the same name as outer local variables for block arguments or block local variables. This is a mimic of the warning "shadowing outer local variable - foo" from ruby -cw.

Example:

# bad

def some_method
  foo = 1

  2.times do |foo| # shadowing outer `foo`
    do_something(foo)
  end
end

Example:

# good

def some_method
  foo = 1

  2.times do |bar|
    do_something(bar)
  end
end

There are no issues that match your filters.

Category
Status