Merged
Conversation
Calling code can optionally specify the line ending. If they don't specify the line ending then it will be sniffed automatically. By passing the correct line ending to the streamReader() no line ending characters are included in the lines returned from the streamReader. Note that any files with mixed line endings will result in undefined behavior. But it was always like that.
If the correct lineEnding is set for the streamReader no line ending characters will be returned as part of lines. So there's no need to check for them in the line contents.
Member
|
Looks good at a first glance, thanks! 👍 Will have a detailed look and merge soon. |
Contributor
Author
|
OK, sounds great. One comment: I made the lineEndingForFile() method private. It could be public. |
Member
|
I just had a detailed look and except for some code style issues (mostly wrongly set whitespaces) it is good. Merging it and tackling the code style changes later on. Good work! 👍 |
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.
This pull request adds code to optionally sniff line endings of CSV files. The user can specify the line ending if they know it or let CSVImporter determine it automatically. Some test were added.