DamienCassou / flycheck-hledger

hledger checker for flycheck

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flycheck-hledger

https://melpa.org/packages/flycheck-hledger-badge.svg https://stable.melpa.org/packages/flycheck-hledger-badge.svg https://github.com/DamienCassou/flycheck-hledger/workflows/CI/badge.svg

Summary

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.

./media/screenshot.png

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.

Installing

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.

Configuration

The table below summarizes the available options. You can use M-x customize-group RET flycheck-options RET to change them.

OptionDescription
flycheck-hledger-strictA boolean activating the strict checks.
flycheck-hledger-checksA list of strings for additional checks.

License

See COPYING. Copyright (c) 2020-2023 Damien Cassou.

Donate using Liberapay

About

hledger checker for flycheck

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 95.9%Language:Makefile 4.1%