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

https://github.com/flycheck/flycheck-eldev

Add Eldev support to Flycheck
https://github.com/flycheck/flycheck-eldev

Last synced: 5 months ago
JSON representation

Add Eldev support to Flycheck

Awesome Lists containing this project

README

          

ifndef::env-github[:icons: font]
ifdef::env-github[]
:warning-caption: :warning:
:caution-caption: :fire:
:important-caption: :exclamation:
:note-caption: :paperclip:
:tip-caption: :bulb:
endif::[]
:source-language: lisp
:uri-flycheck: https://www.flycheck.org/
:uri-flymake: https://www.gnu.org/software/emacs/manual/html_node/emacs/Flymake.html
:uri-flymake-eldev: https://github.com/emacs-eldev/flymake-eldev
:uri-eldev: https://github.com/doublep/eldev
:uri-eldev-installation: https://github.com/doublep/eldev#installation
:uri-melpa-stable: https://stable.melpa.org/#/flycheck-eldev
:uri-melpa-unstable: https://melpa.org/#/flycheck-eldev

= flycheck-eldev

image:https://img.shields.io/badge/license-GPL_3-green.svg[License: GPL 3, link=http://www.gnu.org/licenses/gpl-3.0.txt]
image:http://stable.melpa.org/packages/flycheck-eldev-badge.svg[Melpa Stable, link=http://stable.melpa.org/#/flycheck-eldev]
image:https://github.com/flycheck/flycheck-eldev/workflows/CI/badge.svg[Build status, link=https://github.com/flycheck/flycheck-eldev/actions?query=workflow%3ACI]

Make {uri-flycheck}[Flycheck] use proper dependencies in
{uri-eldev}[Eldev] projects.

For a project to be detected, it must contain file `Eldev` or
`Eldev-local` in its root directory, even if Eldev doesn’t strictly
require that.

TIP: If you are using {uri-flymake}[Flymake] and not Flycheck, check
out a similar project, {uri-flymake-eldev}[flymake-eldev].

== Features

* No additional steps to be performed from the command line, not even
`eldev prepare`. However, you might need to mark the project as
trusted, use `M-x customize-group flycheck-eldev RET`.

* Project dependencies are seen by Flycheck in Emacs. Similarly, if a
package is not declared as a dependency of your project, Flycheck
will complain about unimportable features or undeclared functions.

* Everything is done on-the-fly. As you edit your project’s
dependency list in its main `.el` file, added, removed or mistyped
dependency names immediately become available to Flycheck (there
might be some delays due to network, as Eldev needs to fetch them
first).

* Additional test dependencies (see `eldev-add-extra-dependencies`)
are seen from the test files, but not from the main files.

* Also checks files `Eldev` and `Eldev-local` (as long as they are
byte-compilable, but this is a common Flycheck requirement). Detect
wrong `(eldev-...)` function calls as you type!

== Installation

Download and install the package from {uri-melpa-stable}[MELPA Stable]
or {uri-melpa-unstable}[MELPA]. No further steps necessary: once the
package is installed, it is active and Flycheck will detect any Eldev
projects on-the-fly.

For the extension to have any effect, you need to
{uri-eldev-installation}[install Eldev]. If Flycheck doesn’t seem to
recognize dependencies declared in a project, verify its setup (`C-c !
v`). Normally, you should see something like this at the top:

....
First checker to run:

elisp-eldev
- may enable: yes
- may run: t
- executable: Found at /home/foo/.local/bin/eldev
- project root: ~/foolib
- trusted: yes (...)
- next checkers: emacs-lisp-checkdoc
....

If the project is not trusted, customize some variables in
`flycheck-eldev` group. This is a security feature to avoid running
potentially harmful code from unknown projects. If you don’t need
this precaution, set `flycheck-eldev-unknown-projects` to `trust` (it
is still possible to actively blacklist individual projects after
that).

If you want to deactivate the package for some reason, set variable
`flycheck-eldev-active` to nil.