[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/consult-flycheck b73fc4bcce 11/18: Add support for non-sta
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/consult-flycheck b73fc4bcce 11/18: Add support for non-standard error levels (#2) |
Date: |
Sun, 10 Mar 2024 12:59:54 -0400 (EDT) |
branch: elpa/consult-flycheck
commit b73fc4bcce9c68d01ba9f4100f1c518ee3f3d28b
Author: Sergey Firsov <95489807+intramurz@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Add support for non-standard error levels (#2)
* Fix doc comment to match coding standard
* Add support for auxiliary error levels
---
consult-flycheck.el | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/consult-flycheck.el b/consult-flycheck.el
index c62dac6d72..460bdb3d1c 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -26,7 +26,7 @@
;;; Commentary:
-;; Provides the command `consult-flycheck'. This is an extra package,
+;; Provides the command `consult-flycheck'. This is an extra package,
;; since the consult.el package only depends on Emacs core components.
;;; Code:
@@ -64,13 +64,15 @@ In contrast to `flycheck-error-level-<' sort errors first."
(file-name-nondirectory file)
(buffer-name (flycheck-error-buffer err)))
(number-to-string (flycheck-error-line err))
+ (symbol-name (flycheck-error-level err))
err))
(seq-sort #'consult-flycheck--sort-predicate
flycheck-current-errors)))
(file-width (apply #'max (mapcar (lambda (x) (length (car x)))
errors)))
(line-width (apply #'max (mapcar (lambda (x) (length (cadr x)))
errors)))
- (fmt (format "%%-%ds %%-%ds %%-7s %%s (%%s)" file-width line-width)))
+ (level-width (apply #'max (mapcar (lambda (x) (length (caddr x)))
errors)))
+ (fmt (format "%%%ds %%%ds %%-%ds\t%%s\t(%%s)" file-width line-width
level-width)))
(mapcar
- (pcase-lambda (`(,file ,line ,err))
+ (pcase-lambda (`(,file ,line ,level-name ,err))
(let ((level (flycheck-error-level err)))
(format fmt
(propertize file
@@ -82,12 +84,18 @@ In contrast to `flycheck-error-level-<' sort errors first."
(find-file-noselect
(flycheck-error-filename err) 'nowarn)
(flycheck-error-buffer err)))
'consult--type
- (pcase level
- ('error ?e)
- ('warning ?w)
+ (pcase level-name
+ ((rx (and (0+ nonl)
+ "error"
+ (0+ nonl)))
+ ?e)
+ ((rx (and (0+ nonl)
+ "warning"
+ (0+ nonl)))
+ ?w)
(_ ?i)))
(propertize line 'face 'flycheck-error-list-line-number)
- (propertize (symbol-name level) 'face
(flycheck-error-level-error-list-face level))
+ (propertize level-name 'face
(flycheck-error-level-error-list-face level))
(propertize (flycheck-error-message err) 'face
'flycheck-error-list-error-message)
(propertize (symbol-name (flycheck-error-checker err))
'face 'flycheck-error-list-checker-name))))
- [nongnu] elpa/consult-flycheck 1d43437c1f 05/18: Remove consult--jump-state argument (#1), (continued)
- [nongnu] elpa/consult-flycheck 1d43437c1f 05/18: Remove consult--jump-state argument (#1), ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 9b40f136c0 04/18: Drop Emacs 26 support, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 0ad7e8ff15 03/18: Add link to Emacs, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 92b259e6a8 02/18: Version 0.8, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 51b1b48e8d 07/18: Bump dependencies, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck c371996c57 08/18: Update header, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck fda630411a 10/18: Add keyword completion, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 9aae5b4eb9 09/18: Add finder keywords, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 3f2a7c17cc 12/18: Fix formatting bug when newline character is in error messages (#3), ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 62b036a17c 15/18: .gitignore backups, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck b73fc4bcce 11/18: Add support for non-standard error levels (#2),
ELPA Syncer <=
- [nongnu] elpa/consult-flycheck 0662839aa5 13/18: Version 1.0, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 19fe6f4181 14/18: Add .gitignore, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck d83f87581a 16/18: Bump copyright years, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 754f5497d8 18/18: Update package header, ELPA Syncer, 2024/03/10
- [nongnu] elpa/consult-flycheck 9ac99d656b 17/18: README: Add NonGNU ELPA badges, ELPA Syncer, 2024/03/10