FitnessKeeper/leeroy

View on GitHub

Showing 89 of 89 total issues

Unused method argument - env. If it's necessary, use _ or _env as an argument name to indicate that it won't be used.
Open

      def createTags(tags = {}, resourceids = [], state = self.state, env = self.env, options = self.options)
Severity: Minor
Found in lib/leeroy/helpers/aws.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - ec2. If it's necessary, use _ or _ec2 as an argument name to indicate that it won't be used.
Open

      def destroyInstance(state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/helpers/aws.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Redundant use of Object#to_s in interpolation.
Open

          "DRYRUN_DUMMY_VALUE: #{self.class.to_s}"
Severity: Minor
Found in lib/leeroy/helpers/aws.rb by rubocop

This cop checks for string conversion in string interpolation, which is redundant.

Example:

# bad

"result is #{something.to_s}"

Example:

# good

"result is #{something}"

Unused block argument - x. If it's necessary, use _ or _x as an argument name to indicate that it won't be used. Also consider using a proc without arguments instead of a lambda if you want it to accept any arguments but don't care about them.
Open

      POLL_CALLBACK = lambda {|x| raise 'this is the default callback, did you forget to set the poll_callback attribute?'}
Severity: Minor
Found in lib/leeroy/helpers/polling.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

end at 169, 10 is not aligned with case at 162, 21.
Open

          end
Severity: Minor
Found in lib/leeroy/task/instantiate.rb by rubocop

This cop checks whether the end keywords are aligned properly.

Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

Example: EnforcedStyleAlignWith: keyword (default)

# bad

variable = if true
    end

# good

variable = if true
           end

Example: EnforcedStyleAlignWith: variable

# bad

variable = if true
    end

# good

variable = if true
end

Example: EnforcedStyleAlignWith: startofline

# bad

variable = if true
    end

# good

puts(if true
end)

Unused method argument - env. If it's necessary, use _ or _env as an argument name to indicate that it won't be used.
Open

      def _genInstanceParams(state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/task/instantiate.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - ec2. If it's necessary, use _ or _ec2 as an argument name to indicate that it won't be used.
Open

      def _genImageParams(phase, state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/task/image.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - env. If it's necessary, use _ or _env as an argument name to indicate that it won't be used.
Open

      def _resolveResources(state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/task/instantiate.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused block argument - global_options. If it's necessary, use _ or _global_options as an argument name to indicate that it won't be used.
Open

      c.action do |global_options,options,args|
Severity: Minor
Found in lib/leeroy/app.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

Redundant use of Object#to_s in interpolation.
Open

          "DRYRUN_DUMMY_VALUE: #{self.class.to_s}"
Severity: Minor
Found in lib/leeroy/helpers/aws.rb by rubocop

This cop checks for string conversion in string interpolation, which is redundant.

Example:

# bad

"result is #{something.to_s}"

Example:

# good

"result is #{something}"

Unused method argument - ec2. If it's necessary, use _ or _ec2 as an argument name to indicate that it won't be used.
Open

      def filterImages(selector, collector = lambda { |x| x }, state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/helpers/aws.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used.
Open

      def filterImages(selector, collector = lambda { |x| x }, state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/helpers/aws.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - ec2. If it's necessary, use _ or _ec2 as an argument name to indicate that it won't be used.
Open

      def _resolveResources(state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/task/instantiate.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused block argument - args. If it's necessary, use _ or _args as an argument name to indicate that it won't be used.
Open

      c.action do |global_options,options,args|
Severity: Minor
Found in lib/leeroy/app.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

Useless assignment to variable - resp.
Open

            resp = s3Request(:delete_object, run_params)
Severity: Minor
Found in lib/leeroy/helpers/aws.rb by rubocop

This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

assigned but unused variable - foo

Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

Example:

# bad

def some_method
  some_var = 1
  do_something
end

Example:

# good

def some_method
  some_var = 1
  do_something(some_var)
end

Unused method argument - state. If it's necessary, use _ or _state as an argument name to indicate that it won't be used.
Open

      def _getPackerParams(state = self.state, env = self.env, options = self.options)
Severity: Minor
Found in lib/leeroy/task/packer.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - ec2. If it's necessary, use _ or _ec2 as an argument name to indicate that it won't be used.
Open

      def _genInstanceParams(state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/task/instantiate.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - state. If it's necessary, use _ or _state as an argument name to indicate that it won't be used.
Open

      def postgres(state, options)
Severity: Minor
Found in lib/leeroy/task/fixture.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

end at 33, 10 is not aligned with case at 26, 25.
Open

          end
Severity: Minor
Found in lib/leeroy/helpers/inventory.rb by rubocop

This cop checks whether the end keywords are aligned properly.

Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

Example: EnforcedStyleAlignWith: keyword (default)

# bad

variable = if true
    end

# good

variable = if true
           end

Example: EnforcedStyleAlignWith: variable

# bad

variable = if true
    end

# good

variable = if true
end

Example: EnforcedStyleAlignWith: startofline

# bad

variable = if true
    end

# good

puts(if true
end)

Unused method argument - env. If it's necessary, use _ or _env as an argument name to indicate that it won't be used.
Open

      def genImageIndex(state = self.state, env = self.env, ec2 = self.ec2, options = self.options)
Severity: Minor
Found in lib/leeroy/helpers/inventory.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end
Severity
Category
Status
Source
Language