carmentang/engineerswithoutborders

View on GitHub
features/support/selectors.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use \ instead of + or << to concatenate those strings.
Open

      raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
Severity: Minor
Found in features/support/selectors.rb by rubocop

This cop checks for string literal concatenation at the end of a line.

Example:

# bad
some_str = 'ala' +
           'bala'

some_str = 'ala' <<
           'bala'

# good
some_str = 'ala' \
           'bala'

1 trailing blank lines detected.
Open

Severity: Minor
Found in features/support/selectors.rb by rubocop

Avoid the use of Perl-style backrefs.
Open

      $1
Severity: Minor
Found in features/support/selectors.rb by rubocop

This cop looks for uses of Perl-style regexp match backreferences like $1, $2, etc.

Example:

# bad
puts $1

# good
puts Regexp.last_match(1)

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

    when "the page"
Severity: Minor
Found in features/support/selectors.rb 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 when you don't need string interpolation or special symbols.
Open

      "html > body"
Severity: Minor
Found in features/support/selectors.rb 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"

Align the operands of an expression spanning multiple lines.
Open

        "Now, go and add a mapping in #{__FILE__}"
Severity: Minor
Found in features/support/selectors.rb by rubocop

This cop checks the indentation of the right hand side operand in binary operations that span more than one line.

Example:

# bad
if a +
b
  something
end

# good
if a +
   b
  something
end

There are no issues that match your filters.

Category
Status