Skip to content

purcell/flymake-flycheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Melpa Status Melpa Stable Status Build Status Support me

flymake-flycheck.el: use any Emacs flycheck checker as a flymake backend

This package provides support for running any flycheck checker as a flymake diagnostic backend. The effect is that flymake will control when the checker runs, and flymake will receive its errors.

The core of the package is the ability to wrap a single checker into a flymake diagnostic function which could be added to flymake-diagnostic-functions:

(flymake-flycheck-diagnostic-function-for 'sh-shellcheck)

Flycheck has the convenient notion of "available" checkers, which is determined at runtime according to mode and availability of necessary tools, as well as config for explicitly "chained" checkers.

Accordingly, you can obtain the diagnostic functions for all checkers that flycheck would enable in the current buffer like this:

(flymake-flycheck-all-chained-diagnostic-functions)

In practical terms, most users will want to simply enable all available checkers whenever flymake-mode is enabled:

(add-hook 'flymake-mode-hook 'flymake-flycheck-auto)

If you find that flymake is now running flycheck checkers which are redundant because there's already a flymake equivalent, simply add those checkers to the flycheck-disabled-checkers variable, e.g.

(add-to-list 'flycheck-disabled-checkers 'sh-shellcheck)

Caveats

  • Flycheck UI packages will have no idea of what the checkers are doing, because they are run without flycheck's coordination.
  • Flycheck's notion of "chained checkers" is not handled automatically, so although multiple chained checkers can be used, they will all be executed simultaneously even if earlier checkers fail. This could either be considered a feature, or lead to redundant confusing messages.

Installation

Installable packages are available via MELPA: do M-x package-install RET flymake-flycheck RET.

Alternatively, download the latest release or clone the repository, and install flymake-flycheck.el with M-x package-install-file.


💝 Support this project and my other Open Source work via Patreon

💼 LinkedIn profile

✍ sanityinc.com

About

Use any Emacs flycheck checker as a flymake backend

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published