From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B0CEE158020 for ; Wed, 12 Oct 2022 17:49:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F16ABE0908; Wed, 12 Oct 2022 17:49:21 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8556E0908 for ; Wed, 12 Oct 2022 17:49:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A9BF2340DAB for ; Wed, 12 Oct 2022 17:49:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2B5C15A0 for ; Wed, 12 Oct 2022 17:49:19 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1665596954.665edfbf15422bd7a6b7e405140f993a575c3dd7.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: contrib/emacs/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: contrib/emacs/flycheck-pkgcheck.el X-VCS-Directories: contrib/emacs/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 665edfbf15422bd7a6b7e405140f993a575c3dd7 X-VCS-Branch: master Date: Wed, 12 Oct 2022 17:49:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4cf4526f-9be5-430e-a9c1-b3d0ece9ff99 X-Archives-Hash: c8316d8179a3329ed587a4e166440a6b commit: 665edfbf15422bd7a6b7e405140f993a575c3dd7 Author: Alfred Wingate protonmail com> AuthorDate: Sat Oct 8 15:10:25 2022 +0000 Commit: Arthur Zamarin gentoo 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 protonmail.com> Closes: https://github.com/pkgcore/pkgcheck/pull/464 Signed-off-by: Arthur Zamarin 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ć +;; Author: Maciej Barć +;; Alfred Wingate ;; 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)