Skip to content

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

Open
@Thorium

Description

@Thorium

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions