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

CRLF makes --check report a change while there is nothing to modify #123

Open
etiennebacher opened this issue Dec 21, 2024 · 1 comment · May be fixed by #127
Open

CRLF makes --check report a change while there is nothing to modify #123

etiennebacher opened this issue Dec 21, 2024 · 1 comment · May be fixed by #127

Comments

@etiennebacher
Copy link

etiennebacher commented Dec 21, 2024

I have two files:

  1. no_crlf.R, created on Linux:
if (TRUE) {
}
> file no_crlf.R
no_crlf.R: ASCII text
  1. with_crlf.R, created on Windows and then opened on Linux:
if (TRUE) {
}
> file with_crlf.R
with_crlf.R: ASCII text, with CRLF line terminators

Both files have identical contents and are already formatted, but (I guess that) the CRLF line terminators make --check report some changes to make:

> air format no_crlf.R && air format no_crlf.R --check
> air format with_crlf.R && air format with_crlf.R --check
Would reformat: <path>/with_crlf.R

Tested with air 0.1.1.

Thanks again for this amazing tool

@DavisVaughan
Copy link
Collaborator

DavisVaughan commented Dec 21, 2024

Ah yes, that's a side effect of #90 and will get fixed when we fix that

Thanks for being an early tester! Nice to surface a few of these early bugs

@DavisVaughan DavisVaughan linked a pull request Jan 3, 2025 that will close this issue
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 a pull request may close this issue.

2 participants