Showing 1,556 of 1,556 total issues
Extra empty line detected at block body end. Open
end
- Read upRead up
- Exclude checks
This cops checks if empty lines around the bodies of blocks match the configuration.
Example: EnforcedStyle: empty_lines
# good
foo do |bar|
# ...
end
Example: EnforcedStyle: noemptylines (default)
# good
foo do |bar|
# ...
end
Line is too long. [85/80] Open
# type as key and the wrapper that will be used for all inputs with specified type.
- Exclude checks
Line is too long. [86/80] Open
get 'content_blocks/:slug' => '/admin/content_blocks#edit', as: 'edit_content_block'
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
match "*path" => 'pages#error404', via: [:get, :post]
- Read upRead up
- Exclude checks
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"
Line is too long. [81/80] Open
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
- Exclude checks
Line is too long. [86/80] Open
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
- Exclude checks
Line is too long. [89/80] Open
# These validations are enabled in SimpleForm's internal config but disabled by default
- Exclude checks
Extra empty line detected at block body end. Open
end
- Read upRead up
- Exclude checks
This cops checks if empty lines around the bodies of blocks match the configuration.
Example: EnforcedStyle: empty_lines
# good
foo do |bar|
# ...
end
Example: EnforcedStyle: noemptylines (default)
# good
foo do |bar|
# ...
end
Line is too long. [82/80] Open
post 'activity/filter' => 'pages#activity_log_filter', as: 'activity_log_filter'
- Exclude checks
Use %i
or %I
for an array of symbols. Open
match '/root' => 'options#update', via: [:put, :patch]
- Read upRead up
- Exclude checks
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 of
3` 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]
Line is too long. [92/80] Open
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
- Exclude checks
Line is too long. [83/80] Open
# You can define the class to use on all collection wrappers. Defaulting to none.
- Exclude checks
Final newline missing. Open
end
- Exclude checks
Line is too long. [83/80] Open
post 'form_managers/update' => 'form_managers#update', as: 'form_managers_update'
- Exclude checks
Line is too long. [82/80] Open
get 'form_managers/fields' => 'form_managers#fields', as: 'form_managers_fields'
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Time::DATE_FORMATS[:filename] = "%Y%m%d%H%M%S"
- Read upRead up
- Exclude checks
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"
Do not use spaces inside percent literal delimiters. Open
Rails.application.config.assets.precompile += %w( html5shiv.js html5shiv-printshiv.js )
- Read upRead up
- Exclude checks
Checks for unnecessary additional spaces inside the delimiters of %i/%w/%x literals.
Example:
# good
%i(foo bar baz)
# bad
%w( foo bar baz )
# bad
%x( ls -l )
Line is too long. [87/80] Open
Rails.application.config.assets.precompile += %w( html5shiv.js html5shiv-printshiv.js )
- Exclude checks
Use %i
or %I
for an array of symbols. Open
match 'content_blocks/:slug/update' => '/admin/content_blocks#update', via: [:put, :patch], as: 'update_content_block'
- Read upRead up
- Exclude checks
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 of
3` 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]
Line is too long. [84/80] Open
# unconfirmed_email column, and copied to email column on successful confirmation.
- Exclude checks