fga-gpp-mds/2017.1-OndeE-UnB

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

Summary

Maintainability
A
0 mins
Test Coverage

Do not use space inside array brackets.
Open

  enum room_type: [ :classroom, :laboratory, :professor_room, :study_room, :amphitheater, :academic_center, :kitchen, :SAA, :others]
Severity: Minor
Found in darcyWeb/app/models/room.rb by rubocop

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

Example: EnforcedStyle: space

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

# bad
array = [a, b, c, d]

# good
array = [ a, b, c, d ]

Example: EnforcedStyle: no_space

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

# bad
array = [ a, b, c, d ]

# good
array = [a, b, c, d]

Example: EnforcedStyle: compact

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

# bad
array = [ a, [ b, c ] ]

# good
array = [ a, [ b, c ]]

Line is too long. [132/100]
Open

  enum room_type: [ :classroom, :laboratory, :professor_room, :study_room, :amphitheater, :academic_center, :kitchen, :SAA, :others]
Severity: Minor
Found in darcyWeb/app/models/room.rb by rubocop

Use %i or %I for an array of symbols.
Open

  enum room_type: [ :classroom, :laboratory, :professor_room, :study_room, :amphitheater, :academic_center, :kitchen, :SAA, :others]
Severity: Minor
Found in darcyWeb/app/models/room.rb by rubocop

This cop can check for array literals made up of symbols that are not using the %i() syntax.

Alternatively, it checks for symbol arrays using the %i() syntax on projects which do not want to use that syntax.

Configuration option: MinSize If set, arrays with fewer elements than this value will not trigger the cop. For example, a MinSize of3` will not enforce a style on an array of 2 or fewer elements.

Example: EnforcedStyle: percent (default)

# good
%i[foo bar baz]

# bad
[:foo, :bar, :baz]

Example: EnforcedStyle: brackets

# good
[:foo, :bar, :baz]

# bad
%i[foo bar baz]

There are no issues that match your filters.

Category
Status