myfreecomm/rexpense-client-ruby

View on GitHub
lib/rexpense/entities/expense.rb

Summary

Maintainability
A
0 mins
Test Coverage

Align the elements of an array literal if they span more than one line.
Open

        :distance_kind, :destination, :origin].each { |n| attribute n, String }
Severity: Minor
Found in lib/rexpense/entities/expense.rb by rubocop

Here we check if the elements of a multi-line array literal are aligned.

Example:

# bad
a = [1, 2, 3,
  4, 5, 6]
array = ['run',
     'forrest',
     'run']

# good
a = [1, 2, 3,
     4, 5, 6]
a = ['run',
     'forrest',
     'run']

Align the elements of an array literal if they span more than one line.
Open

        :destination_latitude, :destination_longitude, :origin_longitude,
Severity: Minor
Found in lib/rexpense/entities/expense.rb by rubocop

Here we check if the elements of a multi-line array literal are aligned.

Example:

# bad
a = [1, 2, 3,
  4, 5, 6]
array = ['run',
     'forrest',
     'run']

# good
a = [1, 2, 3,
     4, 5, 6]
a = ['run',
     'forrest',
     'run']

Align the elements of an array literal if they span more than one line.
Open

        :origin_latitude].each { |n| attribute n, Decimal }
Severity: Minor
Found in lib/rexpense/entities/expense.rb by rubocop

Here we check if the elements of a multi-line array literal are aligned.

Example:

# bad
a = [1, 2, 3,
  4, 5, 6]
array = ['run',
     'forrest',
     'run']

# good
a = [1, 2, 3,
     4, 5, 6]
a = ['run',
     'forrest',
     'run']

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

      [:id, :attachments_count, :comments_count, :activities_count,
        :travel_time, :pre_expense_id].each { |n| attribute n, Integer }
Severity: Minor
Found in lib/rexpense/entities/expense.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]

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

      [:amount, :approved_amount, :latitude, :longitude, :distance,
        :destination_latitude, :destination_longitude, :origin_longitude,
        :origin_latitude].each { |n| attribute n, Decimal }
Severity: Minor
Found in lib/rexpense/entities/expense.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]

Align the elements of an array literal if they span more than one line.
Open

        :travel_time, :pre_expense_id].each { |n| attribute n, Integer }
Severity: Minor
Found in lib/rexpense/entities/expense.rb by rubocop

Here we check if the elements of a multi-line array literal are aligned.

Example:

# bad
a = [1, 2, 3,
  4, 5, 6]
array = ['run',
     'forrest',
     'run']

# good
a = [1, 2, 3,
     4, 5, 6]
a = ['run',
     'forrest',
     'run']

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

      [:description, :currency, :approved_amount_currency, :kind, :status,
        :distance_kind, :destination, :origin].each { |n| attribute n, String }
Severity: Minor
Found in lib/rexpense/entities/expense.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