Function: projectile-doctor--collect
projectile-doctor--collect is a byte-compiled function defined in
projectile.el.
Signature
(projectile-doctor--collect &optional DIR)
Documentation
Collect the diagnostic data for DIR's project as a plist.
DIR defaults to default-directory. Outside a project the plist has
a nil :root and the rendering degrades to saying so.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-doctor--collect (&optional dir)
"Collect the diagnostic data for DIR's project as a plist.
DIR defaults to `default-directory'. Outside a project the plist has
a nil `:root' and the rendering degrades to saying so."
(let* ((dir (or dir default-directory))
(root (ignore-errors (projectile-project-root dir))))
(if (null root)
(list :dir dir :root nil)
(let* ((remote (file-remote-p root))
;; The doctor reports prefix-less dirconfig lines as a
;; finding; it shouldn't also pop up the warning buffer over
;; the report it's about to show.
(projectile-warn-on-prefixless-dirconfig-lines nil)
(default-directory root)
(vcs (ignore-errors (projectile-project-vcs root)))
(type (ignore-errors (projectile-project-type)))
(root-func (projectile-doctor--root-function dir))
(ignore-patterns (ignore-errors (projectile--ignore-patterns root)))
(cache-time (gethash root projectile-projects-cache-time)))
(append
(list :dir dir
:root root
:remote remote
:root-function root-func
:root-marker (and root-func
(projectile-doctor--root-marker root-func root))
:name (ignore-errors (projectile-project-name root))
:name-source (if projectile-project-name
'local-variable
projectile-project-name-function)
:type type
:type-source (if projectile-project-type 'local-variable 'detected)
:type-marker (unless projectile-project-type
(projectile-doctor--type-marker type))
:vcs vcs
:indexing-method projectile-indexing-method
:async-indexing projectile-async-indexing
:index-command (projectile-doctor--index-command root vcs)
:git (projectile-doctor--executable "git" remote)
:fd (projectile-doctor--executable
(ignore-errors (projectile-fd-executable-for root)) remote)
:rg (projectile-doctor--executable "rg" remote)
:git-use-fd projectile-git-use-fd
:caching projectile-enable-caching
:cache-time cache-time
:cache-age (and cache-time
(- (projectile-time-seconds) cache-time))
:cache-expire projectile-files-cache-expire
:cache-file (and (projectile-persistent-cache-p)
(not remote)
(let ((file (projectile-project-cache-file root)))
(and (file-exists-p file) file)))
:dirconfig-file (projectile-dirconfig-file)
;; The uncached parser, so the doctor doesn't seed the
;; dirconfig cache as a side effect of looking.
:dirconfig (ignore-errors
(projectile--parse-dirconfig-file-uncached))
:ignore-patterns ignore-patterns
:ensure-patterns (ignore-errors (projectile--ensure-patterns root))
:excluded-entries (unless remote
(projectile-doctor--excluded-entries
root ignore-patterns))
:projectile-mode (bound-and-true-p projectile-mode))
(projectile-doctor--file-info root remote))))))