Showing 1,727 of 1,727 total issues
Prefer single quoted strings Open
Open
@import "sections/notifications";
- Exclude checks
Prefer single quoted strings Open
Open
@import "vendor-modifications/octicons";
- Exclude checks
Properties should be ordered border-radius, box-shadow, font-size, margin, max-width, position Open
Open
position: relative;
- Exclude checks
Color #E5C30F
should be written as #e5c30f
Open
Open
background: #E5C30F;
- Exclude checks
Properties should be ordered background-color, border-radius, flex, padding-bottom, padding-top Open
Open
flex: 0 !important;
- Exclude checks
!important should not be used Open
Open
border-top-right-radius: $box-radius !important;
- Exclude checks
Selector event-box-big__text
should be written in lowercase with hyphens Open
Open
.event-box-big__text,
- Exclude checks
Shorthand form for property padding
should be written more concisely as .65rem .7rem .5rem
instead of .65rem .7rem .5rem .7rem
Open
Open
padding: .65rem .7rem .5rem .7rem;
- Exclude checks
Properties should be ordered padding-bottom, padding-top Open
Open
padding-top: 3.8rem;
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
field_name.remove("updated").gsub("_", " ")
- 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"
Missing magic comment # frozen_string_literal: true
. Open
Open
#!/usr/bin/env ruby
- Read upRead up
- Exclude checks
This cop is designed to help upgrade to Ruby 3.0. It will add the
comment # frozen_string_literal: true
to the top of files to
enable frozen string literals. Frozen string literals may be default
in Ruby 3.0. The comment will be added below a shebang and encoding
comment. The frozen string literal comment is only valid in Ruby 2.3+.
Example: EnforcedStyle: when_needed (default)
# The `when_needed` style will add the frozen string literal comment
# to files only when the `TargetRubyVersion` is set to 2.3+.
# bad
module Foo
# ...
end
# good
# frozen_string_literal: true
module Foo
# ...
end
Example: EnforcedStyle: always
# The `always` style will always add the frozen string literal comment
# to a file, regardless of the Ruby version or if `freeze` or `<<` are
# called on a string literal.
# bad
module Bar
# ...
end
# good
# frozen_string_literal: true
module Bar
# ...
end
Example: EnforcedStyle: never
# The `never` will enforce that the frozen string literal comment does
# not exist in a file.
# bad
# frozen_string_literal: true
module Baz
# ...
end
# good
module Baz
# ...
end
Use the new Ruby 1.9 hash syntax. Open
Open
gem 'rails-erd', :require => false
- Read upRead up
- Exclude checks
This cop checks hash literal syntax.
It can enforce either the use of the class hash rocket syntax or the use of the newer Ruby 1.9 syntax (when applicable).
A separate offense is registered for each problematic pair.
The supported styles are:
- ruby19 - forces use of the 1.9 syntax (e.g.
{a: 1}
) when hashes have all symbols for keys - hash_rockets - forces use of hash rockets for all hashes
- nomixedkeys - simply checks for hashes with mixed syntaxes
- ruby19nomixed_keys - forces use of ruby 1.9 syntax and forbids mixed syntax hashes
Example: EnforcedStyle: ruby19 (default)
# bad
{:a => 2}
{b: 1, :c => 2}
# good
{a: 2, b: 1}
{:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
{d: 1, 'e' => 2} # technically not forbidden
Example: EnforcedStyle: hash_rockets
# bad
{a: 1, b: 2}
{c: 1, 'd' => 5}
# good
{:a => 1, :b => 2}
Example: EnforcedStyle: nomixedkeys
# bad
{:a => 1, b: 2}
{c: 1, 'd' => 2}
# good
{:a => 1, :b => 2}
{c: 1, d: 2}
Example: EnforcedStyle: ruby19nomixed_keys
# bad
{:a => 1, :b => 2}
{c: 2, 'd' => 3} # should just use hash rockets
# good
{a: 1, b: 2}
{:c => 3, 'd' => 4}
!important should not be used Open
Open
margin-top: 2rem !important;
- Exclude checks
!important should not be used Open
Open
border-top-left-radius: $box-radius !important;
- Exclude checks
Properties should be ordered border-radius, padding-bottom Open
Open
padding-bottom: 100%;
- Exclude checks
Prefer single quoted strings Open
Open
@import "abstracts/helpers";
- Exclude checks
Prefer single quoted strings Open
Open
@import "components/spinner";
- Exclude checks
Prefer single quoted strings Open
Open
@import "sections/user-profile";
- Exclude checks
Color white
should be written in hexadecimal form as #ffffff
Open
Open
color: white;
- Exclude checks
Properties should be ordered display, float, line-height, position, top, white-space Open
Open
position: relative;
- Exclude checks