* [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: contrib/emacs/
@ 2022-10-12 17:49 Arthur Zamarin
0 siblings, 0 replies; only message in thread
From: Arthur Zamarin @ 2022-10-12 17:49 UTC (permalink / raw
To: gentoo-commits
commit: 665edfbf15422bd7a6b7e405140f993a575c3dd7
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat Oct 8 15:10:25 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 12 17:49:14 2022 +0000
URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=665edfbf
contrib/emacs: run flycheck only when buffer is saved
* Instead of checking buffer-file-name use built-in function
flycheck-buffer-saved-p which requires the buffer to be saved.
Prior it would lead to the check being ran on an non-existent
file when initially creating an ebuild file.
* Also remove --verbose as listing out every profile is noise that
hinders using the check especially when hovering over with a mouse
cursor.
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/pkgcore/pkgcheck/pull/464
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
contrib/emacs/flycheck-pkgcheck.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/contrib/emacs/flycheck-pkgcheck.el b/contrib/emacs/flycheck-pkgcheck.el
index 4c8f91be..5572ec97 100644
--- a/contrib/emacs/flycheck-pkgcheck.el
+++ b/contrib/emacs/flycheck-pkgcheck.el
@@ -1,14 +1,15 @@
;;; flycheck-pkgcheck.el --- Flycheck checker for ebuilds -*- lexical-binding: t -*-
-;; Copyright (c) 2006-2021, pkgcheck contributors
+;; Copyright (c) 2006-2022, pkgcheck contributors
-;; Authors: Maciej Barć <xgqt@gentoo.org>
+;; Author: Maciej Barć <xgqt@gentoo.org>
+;; Alfred Wingate <parona@protonmail.com>
;; Keywords: convenience processes tools
;; Homepage: https://pkgcore.github.io/pkgcheck/
;; SPDX-License-Identifier: BSD-3-Clause
;; Package-Requires: ((emacs "24.1") (flycheck "32"))
-;; Version: 1.0.0
+;; Version: 1.0.1
@@ -17,7 +18,7 @@
;; Flycheck checker for ebuilds using the "pkgcheck" utility.
-;; This checker uses a reported made exclusively for it - FlycheckReporter.
+;; This checker uses a reporter made exclusively for it - FlycheckReporter.
;; In addition to "Package-Requires" also ebuild-mode is required for hooks.
@@ -44,14 +45,13 @@
(flycheck-define-checker pkgcheck
"A checker for ebuild files."
:modes ebuild-mode
- :predicate (lambda () (buffer-file-name))
+ :predicate flycheck-buffer-saved-p
:command ("pkgcheck"
"scan"
"--exit="
"--reporter=FlycheckReporter"
"--scopes=-git"
- "--verbose"
- (eval (buffer-file-name)))
+ source-original)
:error-patterns
((info
line-start (file-name) ":" line ":" "info" ":" (message) line-end)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-12 17:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-12 17:49 [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: contrib/emacs/ Arthur Zamarin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox