houston/houston-core

View on GitHub
lib/tasks/actions.rake

Summary

Maintainability
Test Coverage

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

    longest_params = actions.map { |action| action.required_params.join(", ").length }.max
Severity: Minor
Found in lib/tasks/actions.rake by rubocop

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"

Prefer single-quoted strings inside interpolations.
Open

      params = "#{action.required_params.join(", ")}" if action.required_params.any?
Severity: Minor
Found in lib/tasks/actions.rake by rubocop

This cop checks that quotes inside the string interpolation match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
result = "Tests #{success ? "PASS" : "FAIL"}"

# good
result = "Tests #{success ? 'PASS' : 'FAIL'}"

Example: EnforcedStyle: double_quotes

# bad
result = "Tests #{success ? 'PASS' : 'FAIL'}"

# good
result = "Tests #{success ? "PASS" : "FAIL"}"

Line is too long. [84/80]
Open

      params = "#{action.required_params.join(", ")}" if action.required_params.any?
Severity: Minor
Found in lib/tasks/actions.rake by rubocop

Prefer to_s over string interpolation.
Open

      params = "#{action.required_params.join(", ")}" if action.required_params.any?
Severity: Minor
Found in lib/tasks/actions.rake by rubocop

This cop checks for strings that are just an interpolated expression.

Example:

# bad
"#{@var}"

# good
@var.to_s

# good if @var is already a String
@var

Line is too long. [109/80]
Open

      puts "  \e[36m#{action.name.ljust(longest_name)}\e[0m  \e[96m#{params.to_s.ljust(longest_params)}\e[0m"
Severity: Minor
Found in lib/tasks/actions.rake by rubocop

Line is too long. [90/80]
Open

    longest_params = actions.map { |action| action.required_params.join(", ").length }.max
Severity: Minor
Found in lib/tasks/actions.rake by rubocop

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

  desc "Lists actions"
Severity: Minor
Found in lib/tasks/actions.rake by rubocop

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