Showing 331 of 343 total issues
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"Id", "Story", "Labels", "Iteration", "Iteration Start", "Iteration End",
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"Id", "Story", "Labels", "Iteration", "Iteration Start", "Iteration End",
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"Story Type", "Estimate", "Current State", "Started At", "Created at", "Accepted at",
- Exclude checks
Line is too long. [117/100] Open
Open
next_number = backlog_iteration.number + 1 + (backlog_iteration.overflows_by / velocity_value).ceil
- Exclude checks
Use day_difference.negative?
instead of day_difference < 0
. Open
Open
day_difference += DAYS_IN_WEEK if day_difference < 0
- Read upRead up
- Exclude checks
This cop checks for usage of comparison operators (==
,
>
, <
) to test numbers as zero, positive, or negative.
These can be replaced by their respective predicate methods.
The cop can also be configured to do the reverse.
The cop disregards nonzero?
as it its value is truthy or falsey,
but not true
and false
, and thus not always interchangeable with
!= 0
.
Example:
# EnforcedStyle: predicate (default)
# bad
foo == 0
0 > foo
bar.baz > 0
# good
foo.zero?
foo.negative?
bar.baz.positive?
Example:
# EnforcedStyle: comparison
# bad
foo.zero?
foo.negative?
bar.baz.positive?
# good
foo == 0
0 > foo
bar.baz > 0
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"Id", "Story", "Labels", "Iteration", "Iteration Start", "Iteration End",
- Exclude checks
Rename is_admin?
to admin?
. Open
Open
def is_admin?(user)
- Read upRead up
- Exclude checks
This cop makes sure that predicates are named properly.
Example:
# bad
def is_even?(value) ...
# good
def even?(value)
# bad
def has_value? ...
# good
def value? ...
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
.where.not(state: "accepted").each do |story|
- Exclude checks
Place the . on the next line, together with the method name. Open
Open
owner.last.group_by { |story| story.iteration_number }.
- Exclude checks
Align select
with @stories.
on line 20. Open
Open
select { |story| story.accepted_at < iteration_start_date(@current_time) }
- Exclude checks
Space inside square brackets detected. Open
Open
[ last_iteration_number, date_for_iteration_number(last_iteration_number) + project.iteration_length.days ]
- Exclude checks
Space inside parentheses detected. Open
Open
days_apart = ( compare_date - iteration_start_date ) / 1.day
- Exclude checks
Space inside parentheses detected. Open
Open
days_apart = ( compare_date - iteration_start_date ) / 1.day
- Exclude checks
Space inside parentheses detected. Open
Open
last_date = backlog_iterations.last.start_date + ( project.iteration_length * DAYS_IN_WEEK )
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"Id", "Story", "Labels", "Iteration", "Iteration Start", "Iteration End",
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"Deadline", "Requested By", "Owned By", "Description", "URL"
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
"Deadline", "Requested By", "Owned By", "Description", "URL"
- Exclude checks
Align .since
with where("subject_type in ('Note', 'Task')")
on line 32. Open
Open
.since(since).to_a
- Exclude checks
Shadowing outer local variable - activities
. Open
Open
end.map do |subject_type, activities|
- Read upRead up
- Exclude checks
This cop looks for use of the same name as outer local variables
for block arguments or block local variables.
This is a mimic of the warning
"shadowing outer local variable - foo" from ruby -cw
.
Example:
# bad
def some_method
foo = 1
2.times do |foo| # shadowing outer `foo`
do_something(foo)
end
end
Example:
# good
def some_method
foo = 1
2.times do |bar|
do_something(bar)
end
end
Avoid multi-line chains of blocks. Open
Open
end.map do |date, activities|
- Read upRead up
- Exclude checks
This cop checks for chaining of a block after another block that spans multiple lines.
Example:
Thread.list.find_all do |t|
t.alive?
end.map do |t|
t.object_id
end