Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reindent #3723

Closed
wants to merge 1 commit into from
Closed

reindent #3723

wants to merge 1 commit into from

Conversation

conao3
Copy link
Contributor

@conao3 conao3 commented Jul 4, 2024

I found eldev lint emit warnings. this PR solves indent issues.

before

$ eldev lint
[1/3] Installing package ‘dash’ (2.19.1) from ‘gnu’...
[2/3] Installing package ‘package-lint’ (0.23) from ‘melpa-stable’...
[3/3] Installing package ‘elisp-lint’ (0.4.0) from ‘melpa-stable’...
Indenting region... 
Indenting region...done
File ‘cider-apropos.el’: no warnings
Indenting region... 
Indenting region...done
cider-browse-ns.el:271:0 (indent) !           (pred items)
cider-browse-ns.el:272:0 (indent) !           (nrepl-dict-keys (nrepl-dict-filter (lambda (_ var-meta)
cider-browse-ns.el:273:0 (indent) !                                                 (funcall pred var-meta))
cider-browse-ns.el:274:0 (indent) !                                               items))))
Found 4 warnings in file ‘cider-browse-ns.el’
Indenting region... 
Indenting region...done
File ‘cider-browse-spec.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-cheatsheet.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-classpath.el’: no warnings
uncompressing ido.el.gz...
uncompressing ido.el.gz...done
Indenting region... 
Indenting region...done
File ‘cider-client.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-clojuredocs.el’: no warnings
uncompressing url-parse.el.gz...
uncompressing url-parse.el.gz...done
uncompressing arc-mode.el.gz...
uncompressing arc-mode.el.gz...done
Indenting region... 
Indenting region...done
File ‘cider-common.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-completion-context.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-completion.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-connection.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-debug.el’: no warnings
uncompressing org-table.el.gz...
uncompressing org-table.el.gz...done
Indenting region... 
Indenting region...done
cider-doc.el:450:0 (indent)      !                       (insert (if face
cider-doc.el:451:0 (indent)      !                                   (propertize text 'font-lock-face face)
cider-doc.el:452:0 (indent)      !                                 text)
cider-doc.el:453:0 (indent)      !                               (or sep "\n"))))
Found 4 warnings in file ‘cider-doc.el’
Indenting region... 
Indenting region...done
File ‘cider-docstring.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-eldoc.el’: no warnings
Indenting region... 
Indenting region...done
cider-eval.el:409:0 (indent)     !                ()
cider-eval.el:410:0 (indent)     !                (let ((p (or (cider-find-property 'cider-note-p)
cider-eval.el:411:0 (indent)     !                             (cider-find-property 'cider-note-p t))))
cider-eval.el:412:0 (indent)     !                  (when p
cider-eval.el:413:0 (indent)     !                    (goto-char p)
cider-eval.el:414:0 (indent)     !                    (message "%s" (get-char-property p 'cider-note))))))
Found 6 warnings in file ‘cider-eval.el’
Indenting region... 
Indenting region...done
File ‘cider-find.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-format.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-inspector.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-jar.el’: no warnings
cider-log.el:108:Warning (check-declare): said ‘logview--guess-submode’ was defined in logview.el: file not found
cider-log.el:109:Warning (check-declare): said ‘logview-initialized-p’ was defined in logview.el: file not found
cider-log.el:110:Warning (check-declare): said ‘logview-mode’ was defined in logview.el: file not found
Indenting region... 
Invalid function: defmacro
cider-log.el:0:0 (check-declare) (declare-function) file not found: "logview--guess-submode" in file "logview.el"
Found 1 warning in file ‘cider-log.el’
Indenting region... 
Indenting region...done
File ‘cider-macroexpansion.el’: no warnings
Indenting region... 
Indenting region...done
cider-mode.el:792:0 (indent)     !                  (plist)
cider-mode.el:793:0 (indent)     !                  ;; Note that (memq 'function cider-font-lock-dynamically) and similar statements are evaluated differently
cider-mode.el:794:0 (indent)     !                  ;; for `core' - they're always truthy for `core' (see related core-handling code some lines below):
cider-mode.el:795:0 (indent)     !                  (let ((do-function (memq 'function cider-font-lock-dynamically))
cider-mode.el:796:0 (indent)     !                        (do-var (memq 'var cider-font-lock-dynamically))
cider-mode.el:797:0 (indent)     !                        (do-macro (memq 'macro cider-font-lock-dynamically))
cider-mode.el:798:0 (indent)     !                        (do-deprecated (memq 'deprecated cider-font-lock-dynamically)))
cider-mode.el:799:0 (indent)     !                    (while plist
cider-mode.el:800:0 (indent)     !                      (let ((sym (pop plist))
cider-mode.el:801:0 (indent)     !                            (meta (pop plist)))
cider-mode.el:802:0 (indent)     !                        (pcase (nrepl-dict-get meta "cider/instrumented")
cider-mode.el:803:0 (indent)     !                          (`nil nil)
cider-mode.el:804:0 (indent)     !                          (`"\"breakpoint-if-interesting\""
cider-mode.el:805:0 (indent)     !                           (push sym instrumented))
cider-mode.el:806:0 (indent)     !                          (`"\"light-form\""
cider-mode.el:807:0 (indent)     !                           (push sym enlightened)))
cider-mode.el:808:0 (indent)     !                        ;; The ::traced keywords can be inlined by MrAnderson, so
cider-mode.el:809:0 (indent)     !                        ;; we catch that case too.
cider-mode.el:810:0 (indent)     !                        ;; FIXME: This matches values too, not just keys.
cider-mode.el:811:0 (indent)     !                        (when (seq-find (lambda (k) (and (stringp k)
cider-mode.el:812:0 (indent)     !                                                         (string-match (rx "clojure.tools.trace/traced" eos) k)))
cider-mode.el:813:0 (indent)     !                                        meta)
cider-mode.el:814:0 (indent)     !                          (push sym traced))
cider-mode.el:815:0 (indent)     !                        (when (and do-deprecated (nrepl-dict-get meta "deprecated"))
cider-mode.el:816:0 (indent)     !                          (push sym deprecated))
cider-mode.el:817:0 (indent)     !                        (let ((is-macro (nrepl-dict-get meta "macro"))
cider-mode.el:818:0 (indent)     !                              (is-function (or (nrepl-dict-get meta "fn")
cider-mode.el:819:0 (indent)     !                                               (nrepl-dict-get meta "arglists"))))
cider-mode.el:820:0 (indent)     !                          (cond ((and do-macro is-macro)
cider-mode.el:821:0 (indent)     !                                 (push sym macros))
cider-mode.el:822:0 (indent)     !                                ((and do-function is-function)
cider-mode.el:823:0 (indent)     !                                 (push sym functions))
cider-mode.el:824:0 (indent)     !                                ((and do-var (not is-function) (not is-macro))
cider-mode.el:825:0 (indent)     !                                 (push sym vars)))))))))
Found 34 warnings in file ‘cider-mode.el’
Indenting region... 
Indenting region...done
cider-ns.el:169:0 (indent)       !                     (cider-emit-into-popup-buffer log-buffer message face t))
cider-ns.el:172:0 (indent)       !                          (log message face)
cider-ns.el:173:0 (indent)       !                          (unless cider-ns-refresh-show-log-buffer
cider-ns.el:174:0 (indent)       !                            (let ((message-truncate-lines t))
cider-ns.el:175:0 (indent)       !                              (message "cider-ns-refresh: %s" message)))))
Found 5 warnings in file ‘cider-ns.el’
Indenting region... 
Indenting region...done
File ‘cider-overlays.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-popup.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-profile.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-repl-history.el’: no warnings
Indenting region... 
Indenting region...done
cider-repl.el:357:0 (indent)     !         (contents)
cider-repl.el:358:0 (indent)     !         (insert-before-markers
cider-repl.el:359:0 (indent)     !          (propertize
cider-repl.el:360:0 (indent)     !           (if (string-blank-p contents) ";;\n" (concat ";; " contents "\n"))
cider-repl.el:361:0 (indent)     !           'font-lock-face 'font-lock-comment-face))))
Found 5 warnings in file ‘cider-repl.el’
Indenting region... 
Indenting region...done
File ‘cider-resolve.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-scratch.el’: no warnings
Indenting region... 
Indenting region...done
cider-selector.el:124:0 (indent) !   (ignore-errors (kill-buffer cider-selector-help-buffer))
cider-selector.el:125:0 (indent) !   (with-current-buffer (get-buffer-create cider-selector-help-buffer)
cider-selector.el:126:0 (indent) !     (insert "CIDER Selector Methods:\n\n")
cider-selector.el:127:0 (indent) !     (cl-loop for (key line nil) in cider-selector-methods
cider-selector.el:128:0 (indent) !              do (insert (format "%c:\t%s\n" key line)))
cider-selector.el:129:0 (indent) !     (goto-char (point-min))
cider-selector.el:130:0 (indent) !     (help-mode)
cider-selector.el:131:0 (indent) !     (display-buffer (current-buffer) t))
cider-selector.el:132:0 (indent) !   (cider-selector)
cider-selector.el:133:0 (indent) !   (current-buffer))
cider-selector.el:139:0 (indent) !   "Most recently visited clojure-mode buffer."
cider-selector.el:140:0 (indent) !   (cider-selector--recently-visited-buffer '(clojure-mode clojure-ts-mode)))
cider-selector.el:143:0 (indent) !   "Most recently visited emacs-lisp-mode buffer."
cider-selector.el:144:0 (indent) !   (cider-selector--recently-visited-buffer 'emacs-lisp-mode))
cider-selector.el:147:0 (indent) !   (top-level))
cider-selector.el:150:0 (indent) !   "Current REPL buffer or as a fallback, the most recently
cider-selector.el:152:0 (indent) !   (or (cider-current-repl)
cider-selector.el:153:0 (indent) !       (cider-selector--recently-visited-buffer 'cider-repl-mode)))
cider-selector.el:156:0 (indent) !   "Current connection's *nrepl-messages* buffer."
cider-selector.el:157:0 (indent) !   (nrepl-messages-buffer (cider-current-repl)))
cider-selector.el:160:0 (indent) !   "*cider-error* buffer."
cider-selector.el:161:0 (indent) !   cider-error-buffer)
cider-selector.el:164:0 (indent) !   "*cider-profile* buffer."
cider-selector.el:165:0 (indent) !   cider-profile-buffer)
cider-selector.el:168:0 (indent) !   "*cider-doc* buffer."
cider-selector.el:169:0 (indent) !   cider-doc-buffer)
cider-selector.el:172:0 (indent) !   "*cider-scratch* buffer."
cider-selector.el:173:0 (indent) !   (cider-scratch-find-or-create-buffer))
Found 28 warnings in file ‘cider-selector.el’
Indenting region... 
Indenting region...done
cider-stacktrace.el:349:0 (indent) !                              (when-let* ((pos (next-single-property-change (point) 'detail)))
cider-stacktrace.el:350:0 (indent) !                                (when (< pos end)
cider-stacktrace.el:351:0 (indent) !                                  (goto-char pos)))))
Found 3 warnings in file ‘cider-stacktrace.el’
Indenting region... 
Indenting region...done
File ‘cider-tracing.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-util.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-xref-backend.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-xref.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider.el’: no warnings
Indenting region... 
Indenting region...done
nrepl-client.el:1405:0 (indent)  !                    (propertize str 'face
nrepl-client.el:1406:0 (indent)  !                                (append '(:weight ultra-bold)
nrepl-client.el:1407:0 (indent)  !                                        (when foreground `(:foreground ,foreground))))))
Found 3 warnings in file ‘nrepl-client.el’
Indenting region... 
Indenting region...done
File ‘nrepl-dict.el’: no warnings
Linting produced warnings

after

$ eldev lint
Indenting region... 
Indenting region...done
File ‘cider-apropos.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-browse-ns.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-browse-spec.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-cheatsheet.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-classpath.el’: no warnings
uncompressing ido.el.gz...
uncompressing ido.el.gz...done
Indenting region... 
Indenting region...done
File ‘cider-client.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-clojuredocs.el’: no warnings
uncompressing url-parse.el.gz...
uncompressing url-parse.el.gz...done
uncompressing arc-mode.el.gz...
uncompressing arc-mode.el.gz...done
Indenting region... 
Indenting region...done
File ‘cider-common.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-completion-context.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-completion.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-connection.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-debug.el’: no warnings
uncompressing org-table.el.gz...
uncompressing org-table.el.gz...done
Indenting region... 
Indenting region...done
File ‘cider-doc.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-docstring.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-eldoc.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-eval.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-find.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-format.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-inspector.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-jar.el’: no warnings
cider-log.el:108:Warning (check-declare): said ‘logview--guess-submode’ was defined in logview.el: file not found
cider-log.el:109:Warning (check-declare): said ‘logview-initialized-p’ was defined in logview.el: file not found
cider-log.el:110:Warning (check-declare): said ‘logview-mode’ was defined in logview.el: file not found
Indenting region... 
Invalid function: defmacro
cider-log.el:0:0 (check-declare) (declare-function) file not found: "logview--guess-submode" in file "logview.el"
Found 1 warning in file ‘cider-log.el’
Indenting region... 
Indenting region...done
File ‘cider-macroexpansion.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-mode.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-ns.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-overlays.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-popup.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-profile.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-repl-history.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-repl.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-resolve.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-scratch.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-selector.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-stacktrace.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-tracing.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-util.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-xref-backend.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider-xref.el’: no warnings
Indenting region... 
Indenting region...done
File ‘cider.el’: no warnings
Indenting region... 
Indenting region...done
File ‘nrepl-client.el’: no warnings
Indenting region... 
Indenting region...done
File ‘nrepl-dict.el’: no warnings
Linting produced warnings

Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

Thanks!

If you're just starting out to hack on CIDER you might find this section of its
manual
extremely useful.

@vemv
Copy link
Member

vemv commented Jul 4, 2024

Thanks for the efforts!

The discussion lives here #3617

IIRC the difficult part was making linting + formatting consistent across Emacs versions.

@conao3
Copy link
Contributor Author

conao3 commented Jul 4, 2024

OK, thanks. Since circleCI checks all PRs, I guess we should trust circleCI's results.
It would be more consistent not to include this change now since my changes are causing the test to fail. Closing.

@conao3 conao3 closed this Jul 4, 2024
@conao3 conao3 deleted the feature/indent branch July 4, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants