AgileVentures/LocalSupport

View on GitHub
app/models/csv_header.rb

Summary

Maintainability
A
0 mins
Test Coverage

Method has too many lines. [9/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def self.build
    new({
      name: 'Title',
      address: 'Contact Address',
      description: 'Activities',
Severity: Minor
Found in app/models/csv_header.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Redundant curly braces around a hash parameter.
Open

    new({
      name: 'Title',
      address: 'Contact Address',
      description: 'Activities',
      website: 'website',
Severity: Minor
Found in app/models/csv_header.rb by rubocop

This cop checks for braces around the last parameter in a method call if the last parameter is a hash. It supports braces, no_braces and context_dependent styles.

Example: EnforcedStyle: braces

# The `braces` style enforces braces around all method
# parameters that are hashes.

# bad
some_method(x, y, a: 1, b: 2)

# good
some_method(x, y, {a: 1, b: 2})

Example: EnforcedStyle: no_braces (default)

# The `no_braces` style checks that the last parameter doesn't
# have braces around it.

# bad
some_method(x, y, {a: 1, b: 2})

# good
some_method(x, y, a: 1, b: 2)

Example: EnforcedStyle: context_dependent

# The `context_dependent` style checks that the last parameter
# doesn't have braces around it, but requires braces if the
# second to last parameter is also a hash literal.

# bad
some_method(x, y, {a: 1, b: 2})
some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)

# good
some_method(x, y, a: 1, b: 2)
some_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})

There are no issues that match your filters.

Category
Status