myfreecomm/rexpense-client-ruby

View on GitHub
lib/rexpense/client.rb

Summary

Maintainability
A
0 mins
Test Coverage

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

      define_method(endpoint + 's') do
Severity: Minor
Found in lib/rexpense/client.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"

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

    %w(organization expense advancement reimbursement tag webhook membership comment).each do |endpoint|
Severity: Minor
Found in lib/rexpense/client.rb by rubocop

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