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

Clean up XMLStackParser #26

Merged
merged 6 commits into from Dec 21, 2018
Merged

Clean up XMLStackParser #26

merged 6 commits into from Dec 21, 2018

Conversation

regexident
Copy link
Contributor

@regexident regexident commented Dec 20, 2018

This PR consists of mostly migrations from if let to guard let as well as other semantics-preserving changed to keep the conditional nesting low and make the control flow clear (i.e. the happy/expected path is the one with the least detours into if or if let blocks).

@codecov
Copy link

codecov bot commented Dec 20, 2018

Codecov Report

Merging #26 into master will decrease coverage by 0.07%.
The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
- Coverage   48.74%   48.66%   -0.08%     
==========================================
  Files          28       28              
  Lines        1629     1644      +15     
==========================================
+ Hits          794      800       +6     
- Misses        835      844       +9
Impacted Files Coverage Δ
Sources/XMLCoder/Auxiliaries/XMLStackParser.swift 83.92% <78.94%> (-14.22%) ⬇️
Sources/XMLCoder/Auxiliaries/XMLElement.swift 90% <92.3%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad96c5e...8573bd8. Read the comment docs.

Copy link
Collaborator

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @regexident! lgtm, except a few guard checks that could be grouped together

Sources/XMLCoder/Auxiliaries/XMLElement.swift Outdated Show resolved Hide resolved
MaxDesiatov
MaxDesiatov previously approved these changes Dec 21, 2018
@MaxDesiatov
Copy link
Collaborator

@hodovani do you have any comments or questions about he PR? this can be merged otherwise.

…nt:namespaceURI:qualifiedName:attributes:)`
@hodovani
Copy link
Contributor

No question from me, thank you @regexident!

@hodovani hodovani merged commit 27bf224 into CoreOffice:master Dec 21, 2018
@regexident regexident deleted the fix/cleanup-parser branch December 24, 2018 11:17
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

3 participants