Sorst
[!NOTE]
Sorst is a tool I'm developing in my spare time as a way to learn Rust and to solve a problem I have in my everyday life. I think it has the potential to be a useful tool, but it's not a seriously maintained one.
Sorst is a command line tool for sorting lines in portions of text files. You can use Sorst to sort parts of files, such as lists in Markdown, YAML, or source code. It decides what and how to sort using comments in the targets, like some code linting tools do.
It's suitable for use as a pre-commit hook or as a pre-merge CI check.
pre-commit
To use Sorst as a pre-commit hook, use the following configuration.
- repo: https://codeberg.org/alexander-bauer/sorst
rev: main # use `pre-commit autoupdate` to fetch the latest tag
hooks:
- id: sorst