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.
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
Ignore line endings in exclude-file #1889
Ignore line endings in exclude-file #1889
Changes from all commits
e46e740
8c3808c
c7fb2f3
36ba85f
c47b7a1
3afdaac
f7a398b
cca3ff4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've realised the issue. This will write back out. See the
-w
based tests (and extend them to prove it/stop us breaking it anyway).An input of
abandonned\nAbandonned\r\nABANDONNED \nAbAnDoNnEd
will becomeabandonned\nAbandonned\nABANDONNED\nAbAnDoNnEd
I thinkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It becomes
abandoned\nAbandoned\nABANDONED \nabandoned
on both codespell 2.0.0 and on the version with modifications from this PR.I'm not quite sure what and why I should be extending tests here as the changes from this PR do not make any changes that would cause any regression. I feel like it would be better suited for a separate PR?
If you don't agree, I can make the changes here, just let me know what test I should be modifying and/or what kind of inputs/outputs should I be checking there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @peternewman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peternewman do you think I could get your decision here so that I know if this is fine or if I should work on something before this will be able to move forward?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @peternewman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd, as we added the tests here in #2490 and they seem to behave okay, although admittedly they are a slightly different code path to the command line version. What OS were you testing on?
I believe the change you're making will introduce a bug, or perhaps simply further embed an existing bug, so I figure fixing the crucial underlying one first is probably a good idea.
As mentioned, I think we've now done that in #2490 so when that's in, you can just update/rebase and as long as your code continue to pass we'll be all good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Back then probably only on Windows 10.
That certainly makes sense, I am just not really sure what the issue is exactly. Hopefully, the tests added in #2490 will make it more clear whether there is any issue and if so, what that issue is, thanks for working on those tests. Once that PR gets merged, I'll rebase.
If any further work on the PR will be needed, I might not get to it before Saturday but other than that, I'll be happy to make any necessary changes 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased the PR on top of current
master
now that the tests got merged. Locally the tests ran fine, you'll have to approve the CI run though since I haven't had any PRs into this repository yet.By the way, in case you don't know, the requirement for approval of workflows for first-time contributors who are NOT new to GitHub can be disabled to decrease the contribution barrier for first-time contributors, see:
https://twitter.com/JakubKuczys/status/1562660410108841986