codeclimate/ruby-test-reporter

View on GitHub

Showing 25 of 25 total issues

Avoid using rescue in its modifier form.
Open

            rails_root:     (Rails.root.to_s rescue nil),

This cop checks for uses of rescue in its modifier form.

Example:

# bad
some_method rescue handle_error

# good
begin
  some_method
rescue
  handle_error
end

Use warn instead of $stderr.puts to allow such output to be disabled.
Open

  $stderr.puts "Cannot batch post - environment variable CODECLIMATE_REPO_TOKEN must be set."
Severity: Minor
Found in bin/cc-tddium-post-worker by rubocop

This cop identifies places where $stderr.puts can be replaced by warn. The latter has the advantage of easily being disabled by, e.g. the -W0 interpreter flag, or setting $VERBOSE to nil.

Example:

# bad
$stderr.puts('hello')

# good
warn('hello')

Use %q only for strings that contain both single quotes and double quotes.
Open

  spec.post_install_message = %q(
  Code Climate's codeclimate-test-reporter gem has been deprecated in favor of
  our language-agnostic unified test reporter. The new test reporter is faster,
  distributed as a static binary so dependency conflicts never occur, and
  supports parallelized CI builds & multi-language CI configurations.
Severity: Minor
Found in codeclimate-test-reporter.gemspec by rubocop

Empty line detected around arguments.
Open


  Please visit https://docs.codeclimate.com/v1.0/docs/configuring-test-coverage
Severity: Minor
Found in codeclimate-test-reporter.gemspec by rubocop

This cops checks if empty lines exist around the arguments of a method invocation.

Example:

# bad
do_something(
  foo

)

process(bar,

        baz: qux,
        thud: fred)

some_method(

  [1,2,3],
  x: y
)

# good
do_something(
  foo
)

process(bar,
        baz: qux,
        thud: fred)

some_method(
  [1,2,3],
  x: y
)

The name of this source file (codeclimate-test-reporter.rb) should use snake_case.
Open

require "code_climate/test_reporter"
Severity: Minor
Found in lib/codeclimate-test-reporter.rb by rubocop

This cop makes sure that Ruby source files have snake_case names. Ruby scripts (i.e. source files with a shebang in the first line) are ignored.

Example:

# bad
lib/layoutManager.rb

anything/usingCamelCase

# good
lib/layout_manager.rb

anything/using_snake_case.rake
Severity
Category
Status
Source
Language