simplecov_json_formatter's json report now contains an extra key, named groups. This was included on https://github.com/codeclimate-community/simplecov_json_formatter/pull/2 . The current approach for decoding the JSON report into a predefined struct is too rigid due to the use of DisallowUnkownFields().
DisallowUnknownFields causes the Decoder to return an error when the destination is a struct and the input contains object keys which do not match any non-ignored, exported fields in the destination.
Godoc
That explains why the test report will fail to decode the new simplecov_json_formatter report, since it has a new key groups which is not declared on the struct.
This DisallowUknownFields() was use as a strategy to detect when the given simplecov report is on legacy format (simplecov < 0.18). I'm changing the strategy to extract the simplecov version from the test report and make a decision about with simplecov formatter to use based on that.
simplecov_json_formatter
's json report now contains an extra key, namedgroups
. This was included on https://github.com/codeclimate-community/simplecov_json_formatter/pull/2 . The current approach for decoding the JSON report into a predefined struct is too rigid due to the use ofDisallowUnkownFields()
.That explains why the test report will fail to decode the new
simplecov_json_formatter
report, since it has a new keygroups
which is not declared on the struct.This
DisallowUknownFields()
was use as a strategy to detect when the givensimplecov
report is on legacy format (simplecov < 0.18). I'm changing the strategy to extract thesimplecov
version from the test report and make a decision about with simplecov formatter to use based on that.