DanMeakin/ratebeer

View on GitHub
lib/ratebeer/urls.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

    [:beer_url, 
     :brewery_url,
     :country_url, 
     :region_url,
     :style_url,
Severity: Minor
Found in lib/ratebeer/urls.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]

Trailing whitespace detected.
Open

    [:beer_url, 
Severity: Minor
Found in lib/ratebeer/urls.rb by rubocop

Freeze mutable objects assigned to constants.
Open

    BASE_URL   = 'https://www.ratebeer.com'
Severity: Minor
Found in lib/ratebeer/urls.rb by rubocop

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

Freeze mutable objects assigned to constants.
Open

    SEARCH_URL = '/search'
Severity: Minor
Found in lib/ratebeer/urls.rb by rubocop

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

Trailing whitespace detected.
Open

     :country_url, 
Severity: Minor
Found in lib/ratebeer/urls.rb by rubocop

There are no issues that match your filters.

Category
Status