codeclimate/codeclimate-yaml

View on GitHub
lib/cc/yaml.rb

Summary

Maintainability
A
0 mins
Test Coverage

Avoid multi-line ternary operators, use if or unless instead.
Open

        logger.warn key.empty? ? "#{file_name}: #{message}" :
          "#{file_name}: #{key.join(?.)} section - #{message}"
Severity: Minor
Found in lib/cc/yaml.rb by rubocop

This cop checks for multi-line ternary op expressions.

Example:

# bad
a = cond ?
  b : c
a = cond ? b :
    c
a = cond ?
    b :
    c

# good
a = cond ? b : c
a =
  if cond
    b
  else
    c
  end

Do not use the character literal - use string literal instead.
Open

          "#{file_name}: #{key.join(?.)} section - #{message}"
Severity: Minor
Found in lib/cc/yaml.rb by rubocop

Checks for uses of the character literal ?x.

Example:

# bad
?x

# good
'x'

# good
?\C-\M-d

There are no issues that match your filters.

Category
Status