-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathEldev
More file actions
63 lines (50 loc) · 2.28 KB
/
Copy pathEldev
File metadata and controls
63 lines (50 loc) · 2.28 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
; -*- mode: emacs-lisp; lexical-binding: t -*-
(eldev-require-version "1.8.2")
(eldev-use-package-archive 'gnu-elpa)
(eldev-use-package-archive 'nongnu-elpa)
(eldev-use-package-archive 'melpa-stable)
(eldev-use-package-archive 'melpa-unstable)
(eldev-use-plugin 'autoloads)
(eldev-add-extra-dependencies 'test 'buttercup)
(setq byte-compile-docstring-max-column 240)
(setq checkdoc-force-docstrings-flag nil)
(setq checkdoc-permit-comma-termination-flag t)
(setq checkdoc--interactive-docstring-flag nil)
(setq eldev-lint-default-excluded '(package))
(with-eval-after-load 'elisp-lint
;; We will byte-compile with Eldev.
(setf elisp-lint-ignored-validators '("fill-column" "check-declare")
enable-local-variables :safe))
(setq eldev-project-main-file "clojure-ts-mode.el")
;; Exclude tests merged from clojure-mode from running, linting and byte compiling
(setf eldev-test-fileset
`(:and ,eldev-test-fileset
(:not "./clojure-mode-tests/*")))
(setf eldev-standard-excludes
`(:or ,eldev-standard-excludes "./clojure-mode-tests/*"))
(setf eldev-lint-ignored-fileset
`(:or ,eldev-lint-ignored-fileset "./clojure-mode-tests/*"))
(defvar clojure-ts-mode-indent-check-fix nil
"Whether `eldev indent' should rewrite the misindented files.")
(eldev-defcommand clojure-ts-mode-indent-check-command (&rest parameters)
"Check that every Emacs Lisp source file of the project is indented the way
Emacs would indent it. Pass `--fix' to reindent the offenders in place
instead of only reporting them."
:command indent
:category testing
(when parameters
(signal 'eldev-wrong-command-usage `(t "Unexpected command parameters")))
(eldev-load-project-dependencies 'test)
(load (expand-file-name "test/indent-check.el" eldev-project-dir) nil t)
(unless (zerop (clojure-ts-mode-indent-check clojure-ts-mode-indent-check-fix))
(unless clojure-ts-mode-indent-check-fix
(signal 'eldev-error `("Some files are misindented; run `eldev indent --fix'")))))
(eldev-defbooloptions clojure-ts-mode-indent-check-do-fix
clojure-ts-mode-indent-check-just-check
clojure-ts-mode-indent-check-fix
("Reindent the misindented files in place"
:options (--fix))
("Only report the misindented lines"
:options (--check)
:hidden-if :default)
:for-command indent)