iZettle/ninetails

View on GitHub
lib/ninetails/seeds/generator.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

      def self.generate_container(name, container_type, &block)
Severity: Minor
Found in lib/ninetails/seeds/generator.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

Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the & if it should be a binary AND.
Open

        SectionBuilder.new(container.current_revision, section_class).build &block
Severity: Minor
Found in lib/ninetails/seeds/generator.rb by rubocop

This cop checks for ambiguous operators in the first argument of a method invocation without parentheses.

Example:

# bad

# The `*` is interpreted as a splat operator but it could possibly be
# a `*` method invocation (i.e. `do_something.*(some_array)`).
do_something *some_array

Example:

# good

# With parentheses, there's no ambiguity.
do_something(*some_array)

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

      def method_missing(name, *args, &block)
Severity: Minor
Found in lib/ninetails/seeds/generator.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

There are no issues that match your filters.

Category
Status