Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Feb 2, 2020

This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18.

% #!/bin/bash -eo pipefail
  ./cc-test-reporter before-build
  rake coverage
  ./cc-test-reporter after-build --exit-code $?

(snip)

Coverage report generated for RSpec to
/home/circleci/project/coverage. 5051 / 5064 LOC (99.74%) covered.
Error: json: cannot unmarshal object into Go struct field input.coverage
of type []formatters.NullInt

https://circleci.com/gh/rubocop-hq/rubocop-rspec/10604

This patch is a workaround until the following issue will be resolved.
qltysh-archive/test-reporter#418


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the changelog if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.

This PR fixes the following build error when using cc-test-reporter with
SimpleCov 0.18.

```consle
% #!/bin/bash -eo pipefail
  ./cc-test-reporter before-build
  rake coverage
  ./cc-test-reporter after-build --exit-code $?

(snip)

Coverage report generated for RSpec to
/home/circleci/project/coverage. 5051 / 5064 LOC (99.74%) covered.
Error: json: cannot unmarshal object into Go struct field input.coverage
of type []formatters.NullInt
```

https://circleci.com/gh/rubocop-hq/rubocop-rspec/10604

This patch is a workaround until the following issue will be resolved.
qltysh-archive/test-reporter#418
@bquorning
Copy link
Collaborator

Thanks!

I wonder is anyone is using rubocop-rspec’s Code Climate page at all.

@bquorning bquorning merged commit 0e45744 into rubocop:master Feb 3, 2020
@koic koic deleted the workaround_for_cc_test_reporter_with_simplecov branch February 3, 2020 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants