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

Allow "--check" to differ with line-endings style #3103

Open
Thorium opened this issue Aug 9, 2024 · 0 comments
Open

Allow "--check" to differ with line-endings style #3103

Thorium opened this issue Aug 9, 2024 · 0 comments

Comments

@Thorium
Copy link
Member

Thorium commented Aug 9, 2024

I propose we allow fantomas --check to accept ok the files that only contain different line-ending style than original (Windows/Unix/Mac). (So \n or \r\n or whatever).

Why?

Right now what happens is:

  1. fantomas detects "fantomas needs to run". Really important to run it now, otherwise build won't pass!
  2. Then when I run it, it changes the endings to be happy.
  3. git detects there is thousands of modified files. However, (with default git settings, line-endings not set) they are with no changes, nothing to commit.
  4. I'm not going to create PRs to format 1000 of line-endings. OSS-maintainers would just decline the PR. Would cause merge-issues with any other PR open in repo.
  5. ...so after build pass, I "reset file or directory changes" of all these non-modified files.
  6. Any time you need to do a tiny change/PR, repeat: Goto 1.

I don't see world to be a better place with this procedure in place, it just wastes electricity and natural resources of this planet.

image
(A picture of modified not changed files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants