jwhitcraft/dockercompose-generator

View on GitHub
lib/docker-compose/generator/service/net.rb

Summary

Maintainability
A
0 mins
Test Coverage

Do not return a value in net=.
Open

          return @attrs.delete('net') if value.nil?

This cop checks for the use of a return with a value in a context where the value will be ignored. (initialize and setter methods)

Example:

# bad
def initialize
  foo
  return :qux if bar?
  baz
end

def foo=(bar)
  return 42
end

Example:

# good
def initialize
  foo
  return if bar?
  baz
end

def foo=(bar)
  return
end

%w-literals should be delimited by [ and ].
Open

          valid_values = %w(bridge none host container:name container:id)

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

There are no issues that match your filters.

Category
Status