FlamingTempura / bibtex-tidy

Cleaner and Formatter for BibTeX files
https://flamingtempura.github.io/bibtex-tidy/
MIT License
859 stars 66 forks source link

pre-commit cannot modify files #409

Closed jonas-eschle closed 1 month ago

jonas-eschle commented 1 year ago

Hi there, and thanks for the package!

However, I struggle to make it run in pre-commit: using the "--modify" flag, it errors with --modify/-m is only valid when specifying input files

That's how I am using it

  - repo: https://github.com/FlamingTempura/bibtex-tidy
    rev: "v1.11.0"
    hooks:
      - id: bibtex-tidy
        args: ["--modify"]
        files: ^bib/.*bib

The files expression works and gives files, I've tested that with another "echo" hook. Any ideas?

FlamingTempura commented 1 month ago

Fixed in v1.14.0 - the following should work

repos:
-   repo: https://github.com/FlamingTempura/bibtex-tidy
    rev: v1.14.0
    hooks:
    -   id: bibtex-tidy
        files: ^bib/.*bib