houston/houston-core

View on GitHub
templates/new-instance/config/conversations/mentions/unfurl_tasks.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

    if project = e.channel.name != "test" && Project.find_by_slug(e.channel.name)

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Line is too long. [81/80]
Open

    if project = e.channel.name != "test" && Project.find_by_slug(e.channel.name)

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

    if project = e.channel.name != "test" && Project.find_by_slug(e.channel.name)

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"

There are no issues that match your filters.

Category
Status