Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badness-pre-commit

CI

A pre-commit hook for badness, a formatter, linter, and language server for LaTeX.

Distributed as a thin Python package that depends on the badness PyPI package, so pre-commit installs a prebuilt binary wheel—no Rust toolchain or LaTeX distribution required. Wheels are available for Linux, macOS, and Windows on both x64 and ARM64.

Usage

Add this to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/jolars/badness-pre-commit
    # badness version
    rev: v0.24.0
    hooks:
      # Lint .tex, .sty, .cls, .dtx, .ins, and .bib files
      - id: badness-lint
      # Format the same files in place
      - id: badness-format

To apply safe lint autofixes before formatting (badness's fix-then-format pipeline), pass --fix:

- id: badness-lint
  args: [--fix]
- id: badness-format

To check formatting without rewriting files:

- id: badness-format
  args: [--check]

Both hooks pass --force-exclude, so files matched by exclude or extend-exclude in your badness.toml are skipped even though pre-commit names staged files explicitly.

Versioning

Tags mirror badness releases: installing at tag vX.Y.Z gives you badness X.Y.Z. New tags are created automatically when a new badness version is published to PyPI.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages