Skip to content

Commit ed3a15a

Browse files
authored
Add and satisfy linting (#551)
Fixes #550
1 parent 038ad66 commit ed3a15a

File tree

5 files changed

+251
-213
lines changed

5 files changed

+251
-213
lines changed

.circleci/config.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ commands:
4545
lint:
4646
steps:
4747
- run:
48-
name: Run regression tests
49-
command: eldev -dtT compile
48+
name: Lint
49+
command: eldev lint
50+
compile:
51+
steps:
52+
- run:
53+
name: Check for byte-compilation errors
54+
command: eldev -dtT compile --warnings-as-errors
5055

5156
jobs:
5257
test-ubuntu-emacs-26:
@@ -57,6 +62,7 @@ jobs:
5762
- setup
5863
- test
5964
- lint
65+
- compile
6066
test-ubuntu-emacs-27:
6167
docker:
6268
- image: silex/emacs:27-ci
@@ -65,6 +71,7 @@ jobs:
6571
- setup
6672
- test
6773
- lint
74+
- compile
6875
test-ubuntu-emacs-28:
6976
docker:
7077
- image: silex/emacs:28-ci
@@ -73,6 +80,7 @@ jobs:
7380
- setup
7481
- test
7582
- lint
83+
- compile
7684
test-ubuntu-emacs-29:
7785
docker:
7886
- image: silex/emacs:29-ci
@@ -81,6 +89,7 @@ jobs:
8189
- setup
8290
- test
8391
- lint
92+
- compile
8493
test-ubuntu-emacs-master:
8594
docker:
8695
- image: silex/emacs:master-ci
@@ -89,13 +98,15 @@ jobs:
8998
- setup
9099
- test
91100
- lint
101+
- compile
92102
test-macos-emacs-latest:
93103
macos:
94104
xcode: "14.0.0"
95105
steps:
96106
- setup-macos
97107
- test
98108
- lint
109+
- compile
99110
test-windows-emacs-latest:
100111
executor: win/default
101112
steps:
@@ -106,6 +117,7 @@ jobs:
106117
- setup-windows
107118
- test
108119
- lint
120+
- compile
109121

110122
workflows:
111123
version: 2.1

.dir-locals.el

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
;;; Directory Local Variables
2+
;;; For more information see (info "(emacs) Directory Variables")
3+
4+
((emacs-lisp-mode
5+
(bug-reference-url-format . "https://github.com/clojure-emacs/clj-refactor.el/issues/%s")
6+
(bug-reference-bug-regexp . "#\\(?2:[[:digit:]]+\\)")
7+
(indent-tabs-mode . nil)
8+
(fill-column . 80)
9+
(sentence-end-double-space . t)
10+
(emacs-lisp-docstring-fill-column . 75)
11+
(checkdoc-symbol-words . ("top-level" "major-mode" "macroexpand-all" "print-level" "print-length"))
12+
(checkdoc-package-keywords-flag)
13+
(byte-compile-docstring-max-column 240)
14+
(checkdoc-force-docstrings-flag nil)
15+
(checkdoc-arguments-in-order-flag)
16+
(checkdoc-verb-check-experimental-flag)
17+
(elisp-lint-indent-specs . ((if-let* . 2)
18+
(when-let* . 1)
19+
(let* . defun)
20+
(nrepl-dbind-response . 2)
21+
;; need better solution for indenting cl-flet bindings
22+
(insert-label . defun) ;; cl-flet
23+
(insert-align-label . defun) ;; cl-flet
24+
(insert-rect . defun) ;; cl-flet
25+
(cl-defun . 2)
26+
(cljr--update-file . 1)
27+
(cljr--with-string-content . 1)
28+
(with-parsed-tramp-file-name . 2)
29+
(thread-first . 0)
30+
(thread-last . 0)
31+
(transient-define-prefix . defmacro)
32+
(transient-define-suffix . defmacro)))))
33+
34+
;; To use the bug-reference stuff, do:
35+
;; (add-hook 'text-mode-hook #'bug-reference-mode)
36+
;; (add-hook 'prog-mode-hook #'bug-reference-prog-mode)

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
* Internal: avoid the use of deprecated Elisp functions.
6+
57
## 3.9.2
68

79
* [#523](https://github.com/clojure-emacs/clj-refactor.el/issues/523): Increase `js/` namespace detection accuracy for .cljc files.

Eldev

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
;; CIDER cannot be compiled otherwise.
1414
(setf eldev-build-load-before-byte-compiling t)
1515

16+
(setq byte-compile-docstring-max-column 240)
17+
(setq checkdoc-force-docstrings-flag nil)
18+
(setq checkdoc-permit-comma-termination-flag t)
19+
(setq checkdoc--interactive-docstring-flag nil)
20+
1621
(setf eldev-lint-default '(elisp))
1722
(with-eval-after-load 'elisp-lint
1823
;; We will byte-compile with Eldev.
19-
(setf elisp-lint-ignored-validators '("package-lint" "fill-column" "byte-compile")
24+
(setf elisp-lint-ignored-validators '("package-lint" "fill-column" "byte-compile" "checkdoc")
2025
enable-local-variables :safe))

0 commit comments

Comments
 (0)