pre-commit-latex-hooks icon indicating copy to clipboard operation
pre-commit-latex-hooks copied to clipboard

`--ignore-label-content` not recognized

Open kydonian opened this issue 1 year ago • 1 comments

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.

kydonian avatar Sep 09 '24 20:09 kydonian

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

jonasbb avatar Sep 09 '24 21:09 jonasbb