aboutsummaryrefslogtreecommitdiff
path: root/chime-debug.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 09:50:57 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 09:50:57 -0500
commit18bad1aa33e25873b7f30b9d42adde071a63bad9 (patch)
tree3f4d4761680b58d7b23f26f1b9c9c8d18a0ece87 /chime-debug.el
parent1f57189ffbe4f039ea213918c97d0a9496b4db7b (diff)
downloadchime-18bad1aa33e25873b7f30b9d42adde071a63bad9.tar.gz
chime-18bad1aa33e25873b7f30b9d42adde071a63bad9.zip
refactor: clear the rest of the lint backlog and make `make lint' actually work
Took the package-lint commit's foundation and finished the job. Three groups of changes: 1. **checkdoc** is now clean across all three package files. I worked through every warning: 13 missing-double-space-after-period fixes, 4 message-capitalization fixes, 1 trailing-period-on-error fix, 6 Lisp-symbol-should-be-quoted fixes, and one rephrase from "starts" to the imperative "Log the start of an async check". One `chime-debug.el' docstring also exceeded 80 columns and got split into two lines. 2. **`make lint'** ran elisp-lint but had been silently broken. The shell glob `test-*.el' wasn't expanding (CWD ended up at project root, not tests/), and the noisy validators flagged everything. I rewrote the target to lint package files explicitly via absolute paths, preload chime.el so the byte-compiler sees cross-file symbols when checking chime-debug.el, and disable the validators that conflict with project style or duplicate other lint steps: - `--no-checkdoc' (covered by `eask lint checkdoc') - `--no-package-lint' (covered by `eask lint package'; running it on auxiliary files re-flags them as standalone packages) - `--no-indent-character' (project uses spaces per `.claude/rules/elisp.md'; the validator defaults to tabs) - `--no-fill-column' (project allows up to 80; validator defaults to 70) - `--no-indent' (false-positives on dash threading macros `->'/`->>') The validators-disabled list is documented in the recipe header. 3. **Generated autoload files** (`chime-autoloads.el', `tests/tests-autoloads.el') are now gitignored. `tests/tests-autoloads.el' was tracked from an earlier commit; I removed it from the index. Eask regenerates these on every `eask compile' / `eask install-deps' run, so they don't belong in the tree. Verified: `make compile' clean (with byte-compile-error-on-warn t), `make test-all' green at 677 tests, `eask lint package' clean, `eask lint checkdoc' clean, `make lint' clean. Full lint backlog is now zero across all three checks.
Diffstat (limited to 'chime-debug.el')
-rw-r--r--chime-debug.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/chime-debug.el b/chime-debug.el
index 837c075..5fe4c4e 100644
--- a/chime-debug.el
+++ b/chime-debug.el
@@ -45,8 +45,10 @@
;;; Code:
-;; chime-debug.el is loaded by chime.el, so chime is already loaded
-;; No need for (require 'chime) here
+;; chime-debug.el is loaded by chime.el at runtime, so a runtime
+;; `(require 'chime)' would be circular. The byte-compiler is run with
+;; chime preloaded by the lint target (see `-l ../chime.el' in
+;; tests/Makefile's lint recipe) so cross-file symbols resolve there.
;;;###autoload
(defun chime-debug-dump-events ()
@@ -178,7 +180,7 @@ This helps diagnose timing issues with event hydration after Emacs startup."
(defun chime-debug-monitor-event-loading ()
"Enable monitoring of event loading timing.
Logs to *Messages* and sends libnotify notification when events are first
-loaded after Emacs startup. Useful for diagnosing hydration delays.
+loaded after Emacs startup. Useful for diagnosing hydration delays.
To enable:
(setq chime-debug t)
@@ -224,7 +226,7 @@ To enable:
"Warn if async process takes longer than this many seconds.")
(defun chime--debug-log-async-start ()
- "Log when an async check starts."
+ "Log the start of an async check."
(setq chime--debug-async-check-count (1+ chime--debug-async-check-count))
(setq chime--debug-async-start-time (current-time))
(chime--log-silently "[Chime Async #%d] Starting event check at %s"
@@ -418,7 +420,8 @@ Shows loaded features before the check and logs async process details."
(chime--log-silently "✗ Event is NOT within notification interval"))))
(defun chime--debug-filter-check-pipeline (event event-time interval)
- "Debug step: run full notification pipeline for EVENT with EVENT-TIME and INTERVAL."
+ "Debug step: run full notification pipeline for EVENT.
+EVENT-TIME and INTERVAL are passed through to the pipeline."
(chime--log-silently "\n--- Step 4: chime--notifications (full pipeline) ---")
(let* ((times (cdr (assoc 'times event)))
(filtered-times (chime--filter-day-wide-events times))
@@ -442,7 +445,7 @@ Shows loaded features before the check and logs async process details."
;;;###autoload
(defun chime-debug-notification-filtering (event-time interval)
"Debug why a notification might not be generated for EVENT-TIME and INTERVAL.
-EVENT-TIME should be an Emacs time value (from encode-time or current-time).
+EVENT-TIME should be an Emacs time value (from `encode-time' or `current-time').
INTERVAL is the number of minutes before the event to notify.
Traces through the notification filtering pipeline step by step,