jonasbb / pre-commit-latex-hooks

pre-commit hooks to improve LaTeX writing.
Apache License 2.0
48 stars 7 forks source link

`--ignore-label-content` not recognized #155

Open kydonian opened 2 months ago

kydonian commented 2 months ago

Added to my .pre-commit-config.yaml:

  - repo: https://github.com/jonasbb/pre-commit-latex-hooks
    rev: v1.4.0
    hooks:
      - id: ensure-labels-for-sections
        args:
            [
              # If present only check that there is a \label{} but not the value
              "--ignore-label-content",
            ]

Kept getting

$ pre-commit run ensure-labels-for-sections -a
Ensure each section has a matching label.................................Failed
- hook id: ensure-labels-for-sections
- exit code: 2

error: unexpected argument '--ignore-label-content' found

  tip: to pass '--ignore-label-content' as a value, use '-- --ignore-label-content'

Usage: ensure-labels [FILES]...

For more information, try '--help'.

Didn't have time to debug, sorry. But just flagging. Other hooks w/ arguments worked as expected, and I used the syntax suggested in the repo, so I think the syntax is correct.

jonasbb commented 2 months ago

The option doesn't exist in v1.4.0. You need to use at least v1.4.3.