pre-commit / pre-commit-hooks

Some out-of-the-box hooks for pre-commit
MIT License
5.39k stars 710 forks source link

`file-contents-sorter` doesn't use consistent order with `--ignore-case` option #1105

Open alexdewar opened 4 weeks ago

alexdewar commented 4 weeks ago

I'm trying to use file-contents-sorter to keep a dictionary file sorted, ignoring case. The hook runs fine and updates the file, but when I attempt to commit the changes, it resorts the file again, moving around some entries which differ only in case. If I try to commit those changes, the process repeats.

asottile commented 4 weeks ago

works fine for me? please show an actual reproduction