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$