Skip to content

Commit cceca43

Browse files
committed
fix: dminor improvements
1 parent 4f7553e commit cceca43

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

lisp/core/analyze.el

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737

3838
(defun eask-analyze--load-buffer ()
3939
"Return the current file loading session."
40-
(car (cl-remove-if-not
41-
(lambda (elm) (string-prefix-p " *load*-" (buffer-name elm))) (buffer-list))))
40+
(car (cl-remove-if-not (lambda (elm)
41+
(string-prefix-p " *load*-" (buffer-name elm)))
42+
(buffer-list))))
4243

4344
(defun eask-analyze--write-json-format (level msg)
4445
"Prepare log for JSON format.
@@ -108,21 +109,21 @@ Argument LEVEL and MSG are data from the debug log signal."
108109
;; Linting
109110
(dolist (file files)
110111
(eask--silent-error
111-
(eask--save-load-eask-file file
112-
(push file checked-files)
113-
(push file checked-files))))
112+
(eask--save-load-eask-file file
113+
(push file checked-files))))
114114

115115
;; Print result
116116
(eask-msg "")
117-
(cond ((eask-json-p) ; JSON format
117+
(cond ((eask-json-p) ; JSON format
118+
;; Fill content with result.
118119
(when (or eask-analyze--warnings eask-analyze--errors)
119120
(setq content
120121
(eask-analyze--pretty-json (json-encode
121122
`((warnings . ,eask-analyze--warnings)
122123
(errors . ,eask-analyze--errors))))))
123124
;; XXX: When printing the result, no color allow.
124125
(eask--with-no-color
125-
(eask-stdout (or content "{}"))))
126+
(eask-stdout (or content "{}"))))
126127
(eask-analyze--log ; Plain text
127128
(setq content
128129
(with-temp-buffer
@@ -131,7 +132,7 @@ Argument LEVEL and MSG are data from the debug log signal."
131132
(buffer-string)))
132133
;; XXX: When printing the result, no color allow.
133134
(eask--with-no-color
134-
(mapc #'eask-stdout (reverse eask-analyze--log)))))
135+
(mapc #'eask-stdout (reverse eask-analyze--log)))))
135136

136137
(eask-info "(Checked %s file%s)"
137138
(length checked-files)
@@ -160,7 +161,7 @@ Argument LEVEL and MSG are data from the debug log signal."
160161
(files
161162
(eask-analyze--file files)
162163
(when eask-analyze--error-p
163-
(eask--exit 1)))
164+
(eask--exit 'failure)))
164165
;; Pattern defined, but no file found!
165166
(patterns
166167
(eask-info "(No files match wildcard: %s)"

0 commit comments

Comments
 (0)