melpazoid is a bundle of scripts for testing Emacs packages, primarily submissions to MELPA. I’ve been using this to help check MELPA pull requests. The ambition is checks that run in a “clean” environment, either through CI or through a container on your local machine.
This is a work in progress – feedback and pull requests are welcome (search for TODOs, raise an issue, whatever). Note my current aim is to make this code simpler before I make it any more complicated.
The checks are a combination of:
- byte-compile-file
- checkdoc
- package-lint
- a license checker (in melpazoid.py)
- some elisp checks (in melpazoid.el)
1–4 are on the MELPA checklist, so you should always try to get those right. In normal circumstances the build will exit with a failure if there is any byte-compile or package-lint `error` – leeway is given for any `warning`.
The license checker (4) is currently very crude. The elisp checks (5) are not foolproof, sometimes opinionated, and may raise false positives.
You can fork it and let CI do the work, or use it locally.
If you don’t want to install this software or its dependencies, you are encouraged to fork this repository and let CI do the work. Then enable Travis-CI on your fork, or just open a pull request against this repository (I won’t merge it). The eventual build information will report any issues.
Your fork will need to point to the Emacs package you want to build, which can be done by modifying the .travis.yml file in one of the following ways.
Modify the env
field and specify your clone URL and your recipe:
env:
- RECIPE='(my-package :repo "me/my-package-repo" :fetcher github)'
Note the apostrophes around the RECIPE.
Modify the env
field and specify your open MELPA PR:
env:
- MELPA_PR_URL=https://github.com/melpa/melpa/pull/6713
You will need Python ≥ 3.6 (and the requests
package) and Docker. An image
will be built with (hopefully) all of your requirements installed. By
default, it will be run with no network access. The output scroll will report
any discovered issues.
RECIPE='(shx :repo "riscy/shx-for-emacs" :fetcher github)' make
Note the apostrophes around the RECIPE.
MELPA_PR_URL=https://github.com/melpa/melpa/pull/6718 make
This currently only works in macOS; it monitors the clipboard for new MELPA PR’s, then automatically runs the checks on them.
make