-
Notifications
You must be signed in to change notification settings - Fork 205
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
Draft idea for post deserialization validation #251
Conversation
Not sure why I am getting nesting listing errors with the GitHub Action but I can't repro locally. I am using the latest SwiftLint. |
@woolie code looks great, thanks! I'll see if I can figure out what is going on with the linter - it might just be the GitHub Actions version. |
I'm hoping that if the name: SwiftLint
on:
[push, pull_request]
jobs:
docker-lint:
name: Docker Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint with --strict
uses: norio-nomura/[email protected]
with:
args: --strict |
Codecov Report
@@ Coverage Diff @@
## main #251 +/- ##
==========================================
- Coverage 74.74% 74.34% -0.40%
==========================================
Files 13 14 +1
Lines 1829 1910 +81
==========================================
+ Hits 1367 1420 +53
- Misses 462 490 +28
Continue to review full report at Codecov.
|
@drmohundro so I up'ed the lint version as you suggested, I also updated the swift version to current and updated the simulator to the current as well. All of those changes made things pass. |
Sorry for taking a few weeks to get it merged... looks great to me. Next steps to get it fully released are to get docs and a version bump. I'm thinking about including #246 in this, too, and then doing a full version bump. That PR is about a rename so that the primary class doesn't match the module name... some weird SPM issue I think. |
The remaining issue is how to provide validation on the built in types and whether that is important.
Right now it is easy to add an override for the type you are implementing deserialization for, but I'm not sure how you would do the build ins like Int, Double, String without adding the validation on the type that has those inside of them.
I only added tests the BasicItem and nothing for [BasicItem] nor attributes, but the support code is there and can be added if people like the idea.