-
Notifications
You must be signed in to change notification settings - Fork 17
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
Tweaks to DecodingFailureInitializable
#71
Conversation
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
==========================================
+ Coverage 96.62% 96.64% +0.01%
==========================================
Files 33 36 +3
Lines 1185 1192 +7
==========================================
+ Hits 1145 1152 +7
Misses 40 40
Continue to review full report at Codecov.
|
I'm not sure how to feel about the Codebeat issue. The similar code it's flagging is calling two entirely different codepaths, even if the words are similar. |
Tests/DecodingFailureTests.swift
Outdated
|
||
// MARK: - Helper | ||
|
||
private func loadedJSONData(fromFileNamed name: String) -> Data { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we've already got this helper method in DecodingTests.swift
. Can you go ahead and factor it out so that we don't have the same code in 2 spots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do. Will probably add it as an extension to XCTestCase.
@tylermilner Any strong opinions about the Codebeat issue? Is it against the spirit of using it to turn off the rule? |
@wmcginty I kind of feel like it is. I know it's caught a code duplication issue in the past that we fixed (#19) so I would prefer to leave it on, even if it flags some false positives every once in a while. I'm not sure if there's a way we can "ignore" the current issue though to allow for merging. Last I looked, it seemed like Codebeat could use some maturity in managing the rules that it uses to scan your code. |
@tylermilner Added a changelog entry |
Fixed some merge conflicts. Hopefully Codebeat can finish it's check now. |
@@ -5,6 +5,9 @@ | |||
* Remove the type definitions deprecated in 2.0.0 | |||
[Will McGinty](https://github.com/wmcginty) | |||
[#72](https://github.com/BottleRocketStudios/iOS-Hyperspace/pull/72) | |||
* Added failing type information to `DecodingFailureInitializable` allowing the API to make decisions based off of the type that failed to decode and deprecate dynamically keyed decoding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but can we get a newline before this entry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Stupid merge.
RequestDefault
functionality