Showing 208 of 208 total issues
Don't use IDs in selectors. Open
#wsp-event-show-banner {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
label.required:after {
- Exclude checks
Unqualified attribute selectors are known to be slow. Open
.owl-theme .owl-nav [class*='owl-']:hover {
- Exclude checks
Using height with border can sometimes make elements larger than you expect. Open
border: 1px solid #ccc;
- Exclude checks
Adjoining classes: .ms-container .ms-list.ms-focus Open
.ms-container .ms-list.ms-focus{
- Exclude checks
Heading (h3) should not be qualified. Open
.event-preview h3 {
- Exclude checks
Rule is empty. Open
.event-year {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.profile_details dt {
- Exclude checks
Attribute selectors with *= are slow! Open
.owl-theme .owl-controls .owl-nav [class*=owl-]:hover{
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.owl-theme .owl-dots .owl-dot{
- Exclude checks
Favor modifier if
usage when having a single-line body. Another good alternative is the usage of control flow &&
/||
. Open
if participant_group.nil?
- Read upRead up
- Exclude checks
Checks for if and unless statements that would fit on one line
if written as a modifier if/unless. The maximum line length is
configured in the Metrics/LineLength
cop.
Example:
# bad
if condition
do_stuff(bar)
end
unless qux.empty?
Foo.do_something
end
# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?
Standard property 'transform' should come after vendor-prefixed property '-ms-transform'. Open
-ms-transform: rotate(10deg);
- Exclude checks
%i
-literals should be delimited by [
and ]
. Open
before_action :set_event, only: %i(show edit update destroy participants
participants_pdf print_applications print_applications_eating_habits badges print_badges)
- Read upRead up
- Exclude checks
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)
Rule doesn't have all its properties in alphabetical order. Open
.start-page-pictures .picture-2 {
- Exclude checks
Symbol with a boolean name - you probably meant to use true
. Open
validates :number_of_participants, numericality: { only_integer: true, greater_than: 0 }, allow_nil: :true
- Read upRead up
- Exclude checks
This cop checks for :true
and :false
symbols.
In most cases it would be a typo.
Example:
# bad
:true
# good
true
Example:
# bad
:false
# good
false
%i
-literals should be delimited by [
and ]
. Open
enum status: %i(open accepted declined) # per database declaration, the first value is default
- Read upRead up
- Exclude checks
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)
%i
-literals should be delimited by [
and ]
. Open
%i(first_name last_name gender birth_date street_name zip_code city state country discovery_of_site)
- Read upRead up
- Exclude checks
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)
Favor modifier if
usage when having a single-line body. Another good alternative is the usage of control flow &&
/||
. Open
if @event.hidden
- Read upRead up
- Exclude checks
Checks for if and unless statements that would fit on one line
if written as a modifier if/unless. The maximum line length is
configured in the Metrics/LineLength
cop.
Example:
# bad
if condition
do_stuff(bar)
end
unless qux.empty?
Foo.do_something
end
# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?
Favor modifier if
usage when having a single-line body. Another good alternative is the usage of control flow &&
/||
. Open
if @event.hidden
- Read upRead up
- Exclude checks
Checks for if and unless statements that would fit on one line
if written as a modifier if/unless. The maximum line length is
configured in the Metrics/LineLength
cop.
Example:
# bad
if condition
do_stuff(bar)
end
unless qux.empty?
Foo.do_something
end
# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?
Favor modifier if
usage when having a single-line body. Another good alternative is the usage of control flow &&
/||
. Open
if params[:search]
- Read upRead up
- Exclude checks
Checks for if and unless statements that would fit on one line
if written as a modifier if/unless. The maximum line length is
configured in the Metrics/LineLength
cop.
Example:
# bad
if condition
do_stuff(bar)
end
unless qux.empty?
Foo.do_something
end
# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?