StanfordBDHG / ResearchKitOnFHIR

HL7 FHIR Structured Data Capture with ResearchKit on iOS
https://swiftpackageindex.com/StanfordBDHG/ResearchKitOnFHIR/documentation
MIT License
13 stars 2 forks source link

Improve Code Structure Based on New SwiftLint Ruleset #46

Closed PSchmiedmayer closed 2 years ago

PSchmiedmayer commented 2 years ago

Improve Code Structure Based on New SwiftLint Ruleset

:recycle: Current situation & Problem

I have reworked the SwiftLint ruleset for the SPM version of CardinalKit to include rules added in the latest releases and restructured the file. This PR applies the new ruleset to the ResearchKitOnFHIR project.

:bulb: Proposed solution

Adds the new SwiftLint rules file and fixes any SwiftLint errors.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

codecov[bot] commented 2 years ago

Codecov Report

Merging #46 (38a419e) into main (4180099) will increase coverage by 0.06%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46/graphs/tree.svg?width=650&height=150&src=pr&token=A9IUX2PFCL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit)](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit) ```diff @@ Coverage Diff @@ ## main #46 +/- ## ========================================== + Coverage 91.47% 91.52% +0.06% ========================================== Files 8 8 Lines 609 613 +4 ========================================== + Hits 557 561 +4 Misses 52 52 ``` | [Impacted Files](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit) | Coverage Δ | | |---|---|---| | [...IRToResearchKit/ORKNavigableOrderedTask+FHIR.swift](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit#diff-U291cmNlcy9SZXNlYXJjaEtpdE9uRkhJUi9GSElSVG9SZXNlYXJjaEtpdC9PUktOYXZpZ2FibGVPcmRlcmVkVGFzaytGSElSLnN3aWZ0) | `100.00% <ø> (ø)` | | | [...earchKitOnFHIR/FHIRExtensions/FHIRExtensions.swift](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit#diff-U291cmNlcy9SZXNlYXJjaEtpdE9uRkhJUi9GSElSRXh0ZW5zaW9ucy9GSElSRXh0ZW5zaW9ucy5zd2lmdA==) | `96.56% <100.00%> (ø)` | | | [...hKitOnFHIR/FHIRToResearchKit/NavigationRules.swift](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit#diff-U291cmNlcy9SZXNlYXJjaEtpdE9uRkhJUi9GSElSVG9SZXNlYXJjaEtpdC9OYXZpZ2F0aW9uUnVsZXMuc3dpZnQ=) | `88.53% <100.00%> (+0.07%)` | :arrow_up: | | [...tOnFHIR/ResearchKitToFHIR/ORKTaskResult+FHIR.swift](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit#diff-U291cmNlcy9SZXNlYXJjaEtpdE9uRkhJUi9SZXNlYXJjaEtpdFRvRkhJUi9PUktUYXNrUmVzdWx0K0ZISVIuc3dpZnQ=) | `92.43% <100.00%> (+0.18%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit). Last update [4180099...38a419e](https://codecov.io/gh/CardinalKit/ResearchKitOnFHIR/pull/46?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CardinalKit).