Repository navigation
Preserve empty CSV fields and quoted-empty rows at EOF - #146
Open
rupayon123 wants to merge 1 commit into
Open
rupayon123 wants to merge 1 commit into
rupayon123 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The EOF flush currently appends the last field only if its text is nonempty. This drops a trailing empty column (
value,) and an entire quoted-empty single-field row ("") unless a newline follows. Preserve an empty field when there are earlier fields or an explicitly started field, while honoring row offsets and limits and avoiding an extra row after completed/empty input.The five-test regression/control group produces seven failed assertions before the patch. All 47 Swift package tests pass after it. Coverage includes trailing delimiters, quoted empties, header/row width, serialization, whitespace-only and newline-terminated input, skipped rows and row limits. Scoped SwiftLint reports existing Parser.swift spacing/long-signature/void-return warnings; no new warning is on the changed code or test file.
git diff --checkpasses.This is independent of #145's serializer quoting fix and based directly on master. Tests ran on macOS; no device or full Apple-platform matrix claim is made. Prepared with AI assistance; EOF state, skipped-row handling and the actual diff were reviewed.