[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 9173a91 05/16: Add progress indicator for intera
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint 9173a91 05/16: Add progress indicator for interactive relint-directory |
Date: |
Mon, 30 Nov 2020 05:00:58 -0500 (EST) |
branch: externals/relint
commit 9173a91599b1f3cbc39bf3c406789101d6e5fbed
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Add progress indicator for interactive relint-directory
The count is updated every 50 files which seems about right.
---
relint.el | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/relint.el b/relint.el
index ee670b7..8fc2de3 100644
--- a/relint.el
+++ b/relint.el
@@ -2305,8 +2305,15 @@ STRING-START is the start of the string literal (first
double quote)."
TARGET is the file or directory to use for a repeated run."
(relint--prepare-error-buffer target base-dir error-buffer nil)
(let ((total-errors 0)
- (total-suppressed 0))
+ (total-suppressed 0)
+ (nfiles (length files))
+ (count 0))
(dolist (file files)
+ (when (and (not noninteractive)
+ (zerop (% count 50)))
+ (message "Scanned %d/%d file%s..."
+ count nfiles (if (= nfiles 1) "" "s")))
+ (setq count (1+ count))
(with-temp-buffer
(emacs-lisp-mode)
(insert-file-contents file)
@@ -2368,12 +2375,10 @@ and SUPPRESSED is the number of suppressed diagnostics."
"Scan all *.el files in DIR for regexp-related errors."
(interactive "DRelint directory: ")
(message "Finding .el files in %s..." dir)
- (let* ((files (relint--tree-files dir))
- (n (length files)))
- (if (not files)
- (message "No .el files found.")
- (message "Scanning %d file%s..." n (if (= n 1) "" "s"))
- (relint--scan-files files dir dir (relint--get-error-buffer)))))
+ (let ((files (relint--tree-files dir)))
+ (if files
+ (relint--scan-files files dir dir (relint--get-error-buffer))
+ (message "No .el files found."))))
;;;###autoload
(defun relint-current-buffer ()
- [elpa] externals/relint a1ea26c 01/16: Check regexp arguments to more functions, (continued)
- [elpa] externals/relint a1ea26c 01/16: Check regexp arguments to more functions, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint d0fa8a8 10/16: Fix false positives in regexp provenance checks, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 29e5427 11/16: Recognise a few more `featurep` arguments, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 26639c5 16/16: Require xr 1.20, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 7690e3a 08/16: Scan font-lock-defaults correctly, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 4b78e14 09/16: Add table of contents to README, and some advice, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint c792bde 15/16: Perform Emacs version check at compile time, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint c8fd922 12/16: Minor looking-at optimisation, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 5720e12 07/16: Scan regexp arguments to functions in s.el, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint f0241bc 13/16: Increment version to 1.19, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 9173a91 05/16: Add progress indicator for interactive relint-directory,
Mattias Engdegård <=
- [elpa] externals/relint 5572c57 14/16: Emacs 26 compatibility: `directory-files-recursively`, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 1c66438 06/16: Add string-search and string-replace to the list of pure functions, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint b572fcd 02/16: Run automatic tests on Emacs 27.1, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 14a5135 03/16: Minor README correction, Mattias Engdegård, 2020/11/30
- [elpa] externals/relint 8ee9f79 04/16: Avoid descending into .git/ when looking for .el files, Mattias Engdegård, 2020/11/30