DamienCassou / flymake-hledger

Flymake module to check hledger journals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flymake-Hledger

MELPA Stable MELPA pipeline status

Summary

This Emacs package is a Flymake’s backend for hledger: it reports errors in your accounting journal. The backend should work in both ledger-mode and hledger-mode but is only tested in the former.

./media/screenshot.png

This package is similar to flycheck-hledger except that the later relies on the external Flycheck engine whereas Flymake is built inside Emacs.

Installing and configuring

The simplest is to install the package using melpa. You may otherwise prefer to clone the project into your Emacs configuration directory and add the path to the load-path variable.

To enable Flymake in the current buffer, run M-x flymake-hledger-enable. Feel free to add this command to the special eval file or directory-local variables.

hledger features several checks including mandatory and optional ones. Among the optional checks, flymake-hledger enables the strict checks by default. You should modify the content of flymake-hledger-checks to change the checks being run on your journal. Here is an example of initialization code to add to your Emacs configuration in case you want to enable a few more checks:

(dolist (check '("ordereddates" "payees" "recentassertions" "tags"))
  (add-to-list 'flymake-hledger-checks check))

If you are using ledger-mode any compatibility script assigned to ledger-binary-path must have hledger at the end of the name.

License

See COPYING. Copyright (c) 2023 Damien Cassou.

About

Flymake module to check hledger journals

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 95.5%Language:Makefile 4.5%