This package is a flycheck checker for hledger files. It is tested with a fairly recent version of hledger (closely following the main branch of the git repository). If the package doesn’t work for your version of hledger, try to update it and open an issue if it still doesn’t work.
This package is similar to flymake-hledger except that the later relies on Flymake which is built inside Emacs whereas Flycheck is a tool you have to install.
You first need to install flycheck and either install ledger-mode or install hledger-mode.
Run M-x package-refresh-contents
followed by M-x package-install
RET flycheck-hledger RET
. Then, add the following to your
initialization file:
(require 'flycheck-hledger)
If you are using use-package
, here is what you may want to add to
your initialization file instead:
(use-package flycheck-hledger
:after (flycheck ledger-mode)
:demand t)
The code above will make sure that the package is loaded as soon as
both flycheck
and ledger-mode
are loaded.
If you have both flycheck-ledger and flycheck-hledger installed, set
flycheck-disabled-checkers
to (ledger)
locally (e.g., through a
file local variable) in your hledger files to deactivate
flycheck-ledger
.
If you are using ledger-mode
any compatibility script assigned to
ledger-binary-path
must have hledger
at the end of the name.
The table below summarizes the available options. You can use M-x
customize-group RET flycheck-options RET
to change them.
Option | Description |
---|---|
flycheck-hledger-strict | A boolean activating the strict checks. |
flycheck-hledger-checks | A list of strings for additional checks. |
See COPYING. Copyright (c) 2020-2023 Damien Cassou.