-
-
Notifications
You must be signed in to change notification settings - Fork 896
37 lines (31 loc) · 927 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Lint
on:
push:
branches:
- master
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: purcell/setup-emacs@master
with:
version: 27.1
- uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'
- name: Resolve dependency
run: eask install-deps --dev
- name: Run Indentation Lint
run: |
git diff-tree --no-commit-id --name-only -r ${{ github.sha }} \
| grep \.el | grep -v \.dir-locals\.el \
| xargs -t -I^ cask emacs -q --batch ^ --eval "\
(let ((require-final-newline t)) \
(require 'flycheck) \
(eval-buffer) \
(untabify (point-min) (point-max)) \
(indent-region (point-min) (point-max)) \
(save-buffer))" \
; git diff --exit-code