[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 2de1106 04/11: Sort diagnostics by buffer positi
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint 2de1106 04/11: Sort diagnostics by buffer position |
Date: |
Sat, 20 Jun 2020 05:57:40 -0400 (EDT) |
branch: externals/relint
commit 2de1106c366fb25ec1b0d2036babd563a404eeba
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Sort diagnostics by buffer position
This is useful in order to intermingle the useless-backslash warnings
with those from the other checks.
---
relint.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/relint.el b/relint.el
index 73f32a5..ae94890 100644
--- a/relint.el
+++ b/relint.el
@@ -2233,7 +2233,19 @@ STRING-START is the start of the string literal (first
double quote)."
(dolist (form forms)
(relint--check-form-recursively-2 (car form) nil (cdr form) nil))
(relint--miscape-current-buffer)
- (cons (nreverse relint--complaints) relint--suppression-count)))
+ (let ((complaints (nreverse relint--complaints)))
+ (cons
+ (sort complaints
+ ;; Sort by error position if available, expression position
+ ;; otherwise.
+ (lambda (a b)
+ (let ((expr-pos-a (nth 1 a))
+ (expr-pos-b (nth 1 b))
+ (error-pos-a (nth 2 a))
+ (error-pos-b (nth 2 b)))
+ (< (or error-pos-a expr-pos-a)
+ (or error-pos-b expr-pos-b)))))
+ relint--suppression-count))))
(defvar relint-last-target nil
"The last file, directory or buffer on which relint was run.")
- [elpa] externals/relint updated (a54960a -> 0c35e02), Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 6bfba5c 01/11: Always output to stderr when running noninteractively, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 1ea9b91 05/11: Add tests for ineffective backslash check, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0d80c1f 07/11: Rename various 'miscape' identifiers, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint e35fa2e 09/11: Fix doc string predicate, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint e8d8052 03/11: Add checking of ineffective backslashes in string literals, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 329df9c 02/11: Refactor framework, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 2de1106 04/11: Sort diagnostics by buffer position,
Mattias Engdegård <=
- [elpa] externals/relint a1c7bf5 06/11: Describe the ineffective backslash warning in README, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0627d4d 08/11: Simplify (and speed up) string scanning regexp, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0c35e02 11/11: Increment version to 1.18, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 6a86509 10/11: Tuned miscape filtering, Mattias Engdegård, 2020/06/20