Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/DamienCassou/flycheck-hledger

hledger checker for flycheck
https://github.com/DamienCassou/flycheck-hledger

Last synced: 2 months ago
JSON representation

hledger checker for flycheck

Awesome Lists containing this project

README

        

* flycheck-hledger
[[https://melpa.org/#/flycheck-hledger][file:https://melpa.org/packages/flycheck-hledger-badge.svg]]
[[https://stable.melpa.org/#/flycheck-hledger][file:https://stable.melpa.org/packages/flycheck-hledger-badge.svg]]
[[https://github.com/DamienCassou/flycheck-hledger/actions][file:https://github.com/DamienCassou/flycheck-hledger/workflows/CI/badge.svg]]

** Summary

This package is a [[https://www.flycheck.org/en/latest/][flycheck]] checker for [[https://hledger.org][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 [[https://github.com/DamienCassou/flycheck-hledger/issues/new][open an issue]] if it still
doesn't work.

#+CAPTION: flycheck-hledger
[[./media/screenshot.png]]

This package is similar to [[https://github.com/DamienCassou/flymake-hledger][flymake-hledger]] except that the later
relies on [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Flymake.html][Flymake]] which is built inside Emacs whereas Flycheck is a
tool you have to install.

** Installing

You first need to [[https://www.flycheck.org/en/latest/user/installation.html][install flycheck]] and either [[https://github.com/ledger/ledger-mode/#installation][install ledger-mode]] or
[[https://github.com/narendraj9/hledger-mode#installation][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:

#+BEGIN_SRC emacs-lisp
(require 'flycheck-hledger)
#+END_SRC

If you are using ~use-package~, here is what you may want to add to
your initialization file instead:

#+begin_src emacs-lisp
(use-package flycheck-hledger
:after (flycheck ledger-mode)
:demand t)
#+end_src

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 [[https://github.com/purcell/flycheck-ledger][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.

| *Option* | *Description* |
|---------------------------+------------------------------------------|
| ~flycheck-hledger-strict~ | A boolean activating the [[https://hledger.org/hledger.html#strict-checks][strict checks]]. |
| ~flycheck-hledger-checks~ | A list of strings for [[https://hledger.org/hledger.html#check][additional checks]]. |

** License

See [[file:COPYING][COPYING]]. Copyright (c) 2020-2023 Damien Cassou.

#+BEGIN_HTML

Donate using Liberapay

#+END_HTML

# LocalWords: hledger