Skip to content

Commit eb73014

Browse files
committed
Add: Start adding Lisp pre-commit checks
1 parent 88af2ea commit eb73014

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[tools]
22
prek = "latest"
3+
# Required for elisp pre-commit checks, which are broken:
4+
#python = "latest"
35

46
[tasks.tangle]
57
description = "Tangle the org files"

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,12 @@ repos:
1212
hooks:
1313
- id: markdownlint-cli2
1414
args: ["--fix"]
15+
# Disabled: elisp hooks require emacs --batch which fails with tree-sitter
16+
# library issues. See CONTRIBUTING.md for manual elisp validation steps. They
17+
# also need Python, which is managed via .mise.toml
18+
# - repo: https://github.com/jamescherti/pre-commit-elisp
19+
# rev: v1.0.5
20+
# hooks:
21+
# - id: elisp-check-parens
22+
# - id: elisp-check-byte-compile
23+
# - id: elisp-indent

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,14 @@ Thank you for your interest; fork and raise a pull request!
1010
- List tasks: `mise task`
1111

1212
[Prek](https://prek.j178.dev) manages pre-commit hooks; to install them run `prek install`. [`.editorconfig`](.editorconfig) provides hints to editors.
13+
14+
## Validating Emacs Lisp changes
15+
16+
MELPA requires clean byte-compilation and checkdoc validation. Run these checks before submitting:
17+
18+
```elisp
19+
(byte-compile-file "sparkweather.el")
20+
(checkdoc-file "sparkweather.el")
21+
```
22+
23+
Both must complete without warnings.

0 commit comments

Comments
 (0)