codeclimate/ruby-test-reporter

View on GitHub
lib/code_climate/test_reporter.rb

Summary

Maintainability
A
0 mins
Test Coverage

Avoid the use of double negation (!!).
Open

      @run_on_current_branch ||= !!(current_branch =~ /#{configured_branch}/i)
Severity: Minor
Found in lib/code_climate/test_reporter.rb by rubocop

This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

Example:

# bad
!!something

# good
!something.nil?

Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

Use meaningful heredoc delimiters.
Open

    EOS
Severity: Minor
Found in lib/code_climate/test_reporter.rb by rubocop

This cop checks that your heredocs are using meaningful delimiters. By default it disallows END and EO*, and can be configured through blacklisting additional delimiters.

Example:

# good
<<-SQL
  SELECT * FROM foo
SQL

# bad
<<-END
  SELECT * FROM foo
END

# bad
<<-EOS
  SELECT * FROM foo
EOS

Avoid the use of double negation (!!).
Open

      @environment_variable_set = !!ENV["CODECLIMATE_REPO_TOKEN"]
Severity: Minor
Found in lib/code_climate/test_reporter.rb by rubocop

This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

Example:

# bad
!!something

# good
!something.nil?

Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

There are no issues that match your filters.

Category
Status