Skip to main content

Badness

Build and Test Lint Documentation Open VSX VS Code License: MIT

Badness is a language server, formatter, and linter for LaTeX, built on a lossless concrete syntax tree.

It parses LaTeX once and serves three tools from that tree:

  • Formatter (badness format): deterministic, rule-based layout.
  • Linter (badness lint): diagnostics with source snippets.
  • Language server (badness lsp): both, live in your editor.

The architecture follows rust-analyzer: a generic, error-tolerant, hand-written parser produces a lossless tree, semantics are layered on top as a separate concern, and recomputation is incremental. badness never requires resolving macros or catcodes to succeed—anything it cannot statically recognize degrades to generic nodes rather than a crash. Two properties hold by construction and are enforced as tests: losslessness (the tree reconstructs the input byte-for-byte) and idempotence (formatting an already formatted file changes nothing).

Installation

Badness is written in Rust. Build from a checkout:

git clone https://github.com/jolars/badness
cd badness
cargo install --path .

VS Code extension

If you use VS Code or a compatible editor (such as Positron or Cursor), install the Badness extension from the VS Code Marketplace or the Open VSX extension. It bundles the badness binary and starts the language server automatically when you open a .tex file.

Usage

# Format a file in place (or stdin → stdout with no path)
badness format paper.tex

# Verify formatting without writing—exits non-zero if anything would change
badness format --check paper.tex

# Lint, reporting parse diagnostics
badness lint paper.tex

# Run the language server over stdio
badness lsp

Formatter style is set through flags: --line-width (default 80), --indent-width (default 2), and --wrap (reflow by default; also preserve, with sentence/semantic planned). See the documentation for the full reference.

Documentation

Full documentation lives at https://badness.dev/ (built with mdBook from docs/).

Contributing

Architecture, tenets, and conventions are documented in AGENTS.md, written for both human and AI contributors. In short: keep the syntactic layer free of semantic knowledge, every parser feature needs corpus and snapshot tests plus a losslessness assertion, and code stays rustfmt-clean with clippy warnings treated as errors.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

badness-0.6.0.tar.gz (891.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

badness-0.6.0-py3-none-win_arm64.whl (2.4 MB view details)

Uploaded Python 3Windows ARM64

badness-0.6.0-py3-none-win_amd64.whl (2.6 MB view details)

Uploaded Python 3Windows x86-64

badness-0.6.0-py3-none-musllinux_1_2_x86_64.whl (2.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

badness-0.6.0-py3-none-musllinux_1_2_aarch64.whl (2.5 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

badness-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

badness-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

badness-0.6.0-py3-none-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

badness-0.6.0-py3-none-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file badness-0.6.0.tar.gz.

File metadata

  • Download URL: badness-0.6.0.tar.gz
  • Upload date:
  • Size: 891.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for badness-0.6.0.tar.gz
Algorithm Hash digest
SHA256 5f90e4faa077bf32787f15d2000c94313ec1eea8f50dd56cb253402e643ffd31
MD5 2a64a973eba3df38b1e2c7f81710d3b6
BLAKE2b-256 6e2d5d6a05b89af6ca8907d74f2736d40bcbb781f448551125e067f81baef7f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0.tar.gz:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: badness-0.6.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for badness-0.6.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 1af9b424d37e615142311075f4b07dd32f9b9e7428716e735c403bda68f9177e
MD5 a693945f50c10b0c8b57c6d23b3ab5a4
BLAKE2b-256 d19b0e7751459a2cdb4b3a49502fb464a9cb91c99ea789f9c5447fb949591c0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-win_arm64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: badness-0.6.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for badness-0.6.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 587292e657c41ee67f8ee540a0ee607b2beadb3e7f4fe9de6cadaf623d47a14a
MD5 2d125db967d9c0ad09affe3dd374c065
BLAKE2b-256 13a05ab25d0f32dcc73f8aaaf2dadab899e434f012b8f7b35dde50490aae460a

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-win_amd64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.6.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 917f06552a34c05e0dc0ff9138df520095edc8fdd43c5adc25f2415582f14d6b
MD5 1324a81c9b10f3276c7a2e64c1c002d6
BLAKE2b-256 128d4dec95eb338b31b7892ec045ac57af7987917952531b2d3071df94721e12

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for badness-0.6.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e3ba7f9739f828fb15d1f4d218094955d970c9e66133128ca5a29552ca73a9c2
MD5 1fe31941c5cde739099c892012cdd31b
BLAKE2b-256 b15648e8baa86c8210927d14350975640525c25d118a15fc6115ac8ae0828b4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 876dcd8bde5a6fe0d2f2db3c485da72192f196ada78cfda20d9c8715a1d7e1f2
MD5 3e65d8658adf1159c99e2b19206d8644
BLAKE2b-256 3042f47a270e503eeebbb99d5eb8a44f578dfbf9858aa26ac1ff38d2b13be695

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for badness-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 13282148483033da8cda0f3043865779a3ecabc6b0083524f1e4f86fd8c071a3
MD5 5f604a6732558026feb68ffd8f4c528e
BLAKE2b-256 7c1fe336715c986ce73a1198958aac50dd12b61f06366b04a6c4a120b625b03a

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for badness-0.6.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d9ec3cdb7afe9a77d4ddf7151ce278e14ecda463f748449f426de4439407e23
MD5 a4625720382fcc4e75568c5116f9ff26
BLAKE2b-256 e3a6ddf772e91e22abf8555d48e361ad5f949a007c65a41dd7678c54b2b5e073

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file badness-0.6.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.6.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7a0521b90c82ec2bf641f59b0556de53e1a96aff7cceb9097ef39b53f22b91db
MD5 a2884b5a93abe83d4dafb1480b614e92
BLAKE2b-256 cb0643e6787732f87f39e0d411b368420dd8362b71fee3d746ecb16b807a5d3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.6.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on jolars/badness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page