Showing 331 of 343 total issues
Line is too long. [103/100] Open
Open
extra_iterations = ( std_dev * iterations.size / mean_of_last_ten_iterations ).round
- Exclude checks
Align the elements of a hash literal if they span more than one line. Open
Open
user_name: matches[2],
- 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
Space inside parentheses detected. Open
Open
extra_iterations = ( std_dev * iterations.size / mean_of_last_ten_iterations ).round
- Exclude checks
Line is too long. [110/100] Open
Open
accepted = accepted.sort_by { |story| story.accepted_at }.group_by { |story| story.accepted_at.to_date }
- Exclude checks
Line is too long. [111/100] Open
Open
[ last_iteration_number, date_for_iteration_number(last_iteration_number) + project.iteration_length.days ]
- Exclude checks
Avoid multi-line chains of blocks. Open
Open
end.
reduce({}) do |group, iteration|
- 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
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
@dummy_user ||= User.find_or_create_by!(username: "dummy", email: "dummy@foo.com", name: "Dummy", initials: "XX")
- Exclude checks
Trailing whitespace detected. Open
Open
return if record.action != 'update'
- Exclude checks
Use next
to skip iteration. Open
Open
if %w[Note Comment].include?(header) && value
- Read upRead up
- Exclude checks
Use next
to skip iteration instead of a condition at the end.
Example:
# bad
[1, 2].each do |a|
if a == 1
puts a
end
end
# good
[1, 2].each do |a|
next unless a == 1
puts a
end
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
Use a guard clause instead of wrapping the code inside a conditional expression. Open
Open
if team_slug
- Read upRead up
- Exclude checks
Use a guard clause instead of wrapping the code inside a conditional expression
Example:
# bad
def test
if something
work
end
end
# good
def test
return unless something
work
end
# also good
def test
work if something
end
# bad
if something
raise 'exception'
else
ok
end
# good
raise 'exception' if something
ok
Place the . on the next line, together with the method name. Open
Open
select { |record| record.owned_by.nil? }.
- Exclude checks
Line is too long. [113/100] Open
Open
ten_iterations_slice = Statistics.slice_to_sample_size(group_by_velocity.values, STD_DEV_ITERATIONS)
- Exclude checks
Align .includes
with where("subject_type in ('Project', 'Story')")
on line 28. Open
Open
.includes(:user, :subject)
- Exclude checks
Align .includes
with where("subject_type in ('Note', 'Task')")
on line 32. Open
Open
.includes(:user, subject: [:story])
- Exclude checks
Place the . on the next line, together with the method name. Open
Open
end.
- Exclude checks
Place the . on the next line, together with the method name. Open
Open
group_by { |story| story.iteration_number }.
- 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
Favor unless
over if
for negative conditions. Open
Open
if !backlog_iteration.can_take_story?(story)
# Iterations sometimes 'overflow', i.e. an iteration may contain a
# 5 point story but the project velocity is 1. In this case, the
# next iteration that can have a story added is the current + 4.
next_number = backlog_iteration.number + 1 + (backlog_iteration.overflows_by / velocity_value).ceil
- Read upRead up
- Exclude checks
Checks for uses of if with a negated condition. Only ifs without else are considered. There are three different styles:
- both
- prefix
- postfix
Example:
# EnforcedStyle: both
# enforces `unless` for `prefix` and `postfix` conditionals
# good
unless foo
bar
end
# bad
if !foo
bar
end
# good
bar unless foo
# bad
bar if !foo
Example:
# EnforcedStyle: prefix
# enforces `unless` for just `prefix` conditionals
# good
unless foo
bar
end
# bad
if !foo
bar
end
# good
bar if !foo
Example:
# EnforcedStyle: postfix
# enforces `unless` for just `postfix` conditionals
# good
bar unless foo
# bad
bar if !foo
# good
if !foo
bar
end