StringManipulation
StringManipulation copied to clipboard
Allow hierarchical sort to keep simple items first
When performing a hierarchical sort on a yaml file, I would like to be able to keep the keys with the deeply nested values after the ones with just a simple string/number value to improve readability:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-json
rather than the current result of this:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-json
rev: v5.0.0 # <----------------this gets moved to the end