fga-gpp-mds/2017.1-OndeE-UnB

View on GitHub
darcyWeb/app/models/point.rb

Summary

Maintainability
A
0 mins
Test Coverage

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

      enum type_point: ["Bicicletario", "Banheiro", "Lanchonete", "Parada de Onibus", "Entrada de Edificio", "Ponto de Informacao"]
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Line is too long. [131/100]
Open

      enum type_point: ["Bicicletario", "Banheiro", "Lanchonete", "Parada de Onibus", "Entrada de Edificio", "Ponto de Informacao"]
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

      enum type_point: ["Bicicletario", "Banheiro", "Lanchonete", "Parada de Onibus", "Entrada de Edificio", "Ponto de Informacao"]
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

      enum type_point: ["Bicicletario", "Banheiro", "Lanchonete", "Parada de Onibus", "Entrada de Edificio", "Ponto de Informacao"]
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Space inside } missing.
Open

      validates :description, length: { maximum: 200}, presence: true
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

      enum type_point: ["Bicicletario", "Banheiro", "Lanchonete", "Parada de Onibus", "Entrada de Edificio", "Ponto de Informacao"]
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Use 2 (not 6) spaces for indentation.
Open

      acts_as :location
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

      enum type_point: ["Bicicletario", "Banheiro", "Lanchonete", "Parada de Onibus", "Entrada de Edificio", "Ponto de Informacao"]
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

      enum type_point: ["Bicicletario", "Banheiro", "Lanchonete", "Parada de Onibus", "Entrada de Edificio", "Ponto de Informacao"]
Severity: Minor
Found in darcyWeb/app/models/point.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

There are no issues that match your filters.

Category
Status