Skip to content

check-byte-order-marker deprecation #645

Description

@Dunedan

As part of #522 the check-byte-order-marker hook got deprecated. If I'm not mistaken there is no replacement hook for the same functionality (checking for BOMs, but not removing them automatically). Am I missing something or why did the check-byte-order-marker hook get deprecated?

For our use case we never want pre-commit hooks to change files automatically, but only act as a way to detect violations.

Activity

  1. asottile commented on Aug 31, 2021

    @asottile
    Member

    yeah it has been moved to fixer only

  2. Dunedan commented on Sep 1, 2021

    @Dunedan
    ContributorAuthor

    yeah it has been moved to fixer only

    Well yes, that's what I also mentioned in my question. I'm still trying to understand why change was made. Can you please elaborate on that?

  3. asottile commented on Sep 1, 2021

    @asottile
    Member

    fixers are significantly less toilsome than checkers

  4. Dunedan commented on Sep 1, 2021

    @Dunedan
    ContributorAuthor

    In which regard are they less toilsome? To develop or to use?

    For usage I believe it's important to have hooks which only report issues, but don't attempt to fix them. Actually that's how I (and I believe other users as well) use pre-commit exclusively.

    Hooks which try to automatically fix something are undesirable in situations where users want to be in control what gets committed and want to review all changes prior to committing.

  5. asottile commented on Sep 1, 2021

    @asottile
    Member

    I think you misunderstand how pre-commit works. hooks may change files but they never are automatically committed in that way (the commit is aborted)

  6. Dunedan commented on Sep 2, 2021

    @Dunedan
    ContributorAuthor

    I was indeed ignorant about what pre-commit exactly does when modifying files. That doesn't however change my preference that I don't want pre-commit to modify files at all.

    I still don't understand if hooks are more toilsome to develop or to use. I'd be grateful if you could elaborate on that.

    Also what's the strategy for this repository? Remove all check-only hooks eventually? Replace check-only hooks with fixer hooks once a fixer hook becomes available? Something different?

    Would you be open for PRs adding check-only functionality to hooks which currently only support fixing?

  7. asottile commented on Sep 2, 2021

    @asottile
    Member

    I'm more interested in maintaining fixers than checkers and where possible will be replacing them and not maintaining checkers

    checkers are a worse experience for users. computers are really good at fixing things so just let them do it

    I will not be accepting PRs to add check-only modes

  8. Dunedan commented on Sep 2, 2021

    @Dunedan
    ContributorAuthor

    Thanks for your explanations. Much appreciated. 🙂

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions