Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
align-left

GitHub Action

Emacs Lisp check

v1.0

Emacs Lisp check

align-left

Emacs Lisp check

Run a number of different Emacs Lisp checks.

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Emacs Lisp check

uses: leotaku/[email protected]

Learn more about this action in leotaku/elisp-check

Choose a version

A GitHub Action for Emacs Lisp CI 📜

GitHub License GitHub Workflow Status GitHub Release

Provides a zero-config CI solution for Emacs Lisp packages.

Most Emacs packages currently use either no or an ad-hoc script based CI setup. This GitHub Action aims to change that.

Adding this Action to your Emacs package repository immediately provides you with a default suite of code style checks that are required to get your package accepted into MELPA. Using only one additional line of YAML, you can also run your ERT tests on GitHub Actions.

See the actions tab for runs of this action! 🚀

See the COMPARISON.md file for a more thorough comparison with other solutions for Emacs Lisp CI. 🛒

Supported Checks

Features

  • Require zero configuration for great results
  • Support accepted Emacs Lisp coding standards and test frameworks
  • Expose helpful code annotations
  • Support running checks on your local machine (elisp-check-run)
  • Support older Emacs versions (24.1 and up)

Non-Features

  • Support esoteric practices not accepted by MELPA
  • Define or use opinionated style checks

Usage

Linting

uses: leotaku/elisp-check@master
with:
  file: main-file.el

Tests

uses: leotaku/elisp-check@master
with:
  check: ert
  file: test-file.el

Note that this action does not install a suitable emacs executable by itself. For this purpose, I recommend using Steve Purcell's excellent setup-emacs GitHub Action.

For an example of real-life usage, see the Actions config for my theist-mode package.

Advanced usage

uses: leotaku/elisp-check@master
with:
  check: melpa
  file: '*.el'
  ignore_warnings: false
  warnings_as_errors: false

The above yaml code block shows the default configuration values for this GitHub Action.

Name Description Type
check Emacs Lisp check to execute Supported check
file Entry file for Emacs Lisp check File with globbing
ignore_warnings Whether to ignore warnings Boolean
warnings_as_errors Whether to treat warnings as errors Boolean

Users are encouraged to make use of GitHub Actions matrix feature to run different checks, check different entry files and test compatibility with different versions of Emacs.

Running checks locally

It is entirely possible to use your preferred Emacs package manager, or simply load-file, to load elisp-check.el into your local Emacs instance. The function elisp-check-run may then be used to run any supported check locally. Errors and warnings are emitted to the Emacs *Messages* buffer, so both batch and interactive usage is supported.


This project and its documentation were heavily inspired by and at times derive from Steve Purcell's work.

If possible, please support him and his efforts.