I was surprised I couldn't find [*] a #precommit hook to run the #ChkTeX #LaTeX #linter via the pre-commit framework (https://pre-commit.com) for #git . But it was trivial to create a new pre-commit configuration that runs chktex, I published a WIP repo under: https://github.com/meliache/pre-commit-chktex.
I contains two hooks: chktex-system, which uses the system executable and chktex-conda, which installs chktex via #conda. Still I think probably this already exists somewhere and I just missed it. 1/N
#TeXLaTeX
pre-commit

[*]: Similar projects I found via googling are in the repository readme. In short, there is `pre-commit-latex-hooks`, which runs some custom latex hooks. I found a bash script that runs a precommit script for chktex but it doesn't integrate with the pre-commit framework. And there is pre-commit-hooks-nix, which contains a chktex hook for NixOS.

Currently, there are no configuration options except the default ones, I expect users to customize their .chktexrc.

WARNING: It's still very WIP. 2/3

I think would helpful to have _a_ (not necessarily my) #chktex #precommit hook listed under https://pre-commit.com/hooks.html . This is where I searched for available hooks and only found the `pre-commit-latex-hook` repo, which is cool but not what I was looking for. 3/3
#TeXLaTeX
pre-commit