- Python 100%
Its README and AGENTS.md pass; Dependabot moves the rev with each release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mv4cZ3LFVAJ9aG5SntwnAr |
||
|---|---|---|
| .github | ||
| src/regulad_pre_commit_hooks | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .pre-commit-hooks.yaml | ||
| AGENTS.md | ||
| git-conventional-commits.yaml | ||
| LICENSE.md | ||
| pyproject.toml | ||
| README.md | ||
pre-commit-hooks
The pre-commit hooks that regulad's projects use.
ltex-plus
Checks the prose in a project's documentation and content with
LTeX+, LanguageTool for markup: Markdown, READMEs included, MDX, LaTeX,
reStructuredText, AsciiDoc, Org and Typst files, by extension. A license file is left alone, vendored copies included,
since its text stays exactly as published. Any finding fails the hook, and ltex-cli-plus prints each one with its
rule.
repos:
- repo: https://github.com/regulad/pre-commit-hooks
rev: <full commit SHA> # frozen: <release>
hooks:
- id: ltex-plus
It runs the ltex-cli-plus on PATH, with the shared settings in ~/.config/ltex-plus/: settings.json and
initialization-options.json. regulad/dotfiles installs all three, and its
docs/language-servers.md says what the settings hold. Where they aren't installed, as in CI, skip the hook:
SKIP=ltex-plus.
ltex-cli-plus needs ltex-plus/lsp-cli-plus#72, which sends the repository's root as the workspace folder and the
initialization options, and ltex-plus/ltex-ls-plus#234, which resolves the dictionary's path against it. Prices take two
more: without ltex-plus/ltex-ls-plus#238, a long paragraph with a $ in it stops the check, and without #237, MDX reads
$ as the start of TeX math. Until LTeX+ releases them, regulad/dotfiles installs a build that has them.
A project's own words
A word that LanguageTool doesn't know, and that the project uses as a word rather than as code, goes in
.vscode/ltex.dictionary.en-US.txt, one per line, in UTF-8. VS Code's LTeX+ reads that file by itself, and its "Add to
dictionary" writes there; the shared settings point every other client, this hook included, at the same file. Commit it,
and keep the rest of .vscode/ out of the repository unless the project needs it there:
.vscode/*
!.vscode/ltex.dictionary.en-US.txt
To exclude more than licenses, such as vendored code, give the hook its own exclude. It replaces the hook's, so keep
the license pattern from .pre-commit-hooks.yaml in it.
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.md.