Skip to content

Add pre-commit file-contents-sorter as builtin hook #1843

@janosh

Description

@janosh

file-contents-sorter would be great to have! simple to implement: read lines, sort, write back, exit non-zero if modified. should support --unique and --ignore-case to match pre-commit-hooks.

repos:
  - repo: builtin
    hooks:
      - id: file-contents-sorter
        files: ^tools\.yml$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions