Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for cc-test-reporter with SimpleCov 0.18 #867

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.
codeclimate/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.
codeclimate/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.

None yet

2 participants