hpi-swt2/workshop-portal

View on GitHub
config/initializers/errbit.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

  unless notice[:context][:url].starts_with? "https://workshop-portal.herokuapp.com"
Severity: Minor
Found in config/initializers/errbit.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

  config.ignore_environments = %w(development test cucumber)
Severity: Minor
Found in config/initializers/errbit.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)

Line is too long. [84/80]
Open

  unless notice[:context][:url].starts_with? "https://workshop-portal.herokuapp.com"
Severity: Minor
Found in config/initializers/errbit.rb by rubocop

Final newline missing.
Open

end
Severity: Minor
Found in config/initializers/errbit.rb by rubocop

There are no issues that match your filters.

Category
Status