GNU bug report logs - #40188
check-declare-files does not include malformed declarations in the list

Previous Next

Package: emacs;

Reported by: Neil Okamoto <neil.okamoto <at> gmail.com>

Date: Mon, 23 Mar 2020 00:32:02 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40188 in the body.
You can then email your comments to 40188 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#40188; Package emacs. (Mon, 23 Mar 2020 00:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil Okamoto <neil.okamoto <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 23 Mar 2020 00:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Neil Okamoto <neil.okamoto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: check-declare-files does not include malformed declarations in the
 list
Date: Sun, 22 Mar 2020 17:31:03 -0700
[Message part 1 (text/plain, inline)]
As noted in the subject line: malformed declarations are noted by ‘check-declare-scan’ which logs a message in the ‘check-declare-warning-buffer’.  However that malformed declaration is not passed back to 'check-declare-files’, and therefore its not part of the error list returned from that function.

Software that uses  'check-declare-files' as a lint check would have to parse the warning buffer (an additional step) in order to catch these malformed declarations.

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40188; Package emacs. (Wed, 25 Mar 2020 21:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 40188 <at> debbugs.gnu.org (full text, mbox):

From: Neil Okamoto <neil.okamoto <at> gmail.com>
To: 40188 <at> debbugs.gnu.org
Subject: repro for Emacs 26.3 and 27.0.90
Date: Wed, 25 Mar 2020 14:41:58 -0700
[Message part 1 (text/plain, inline)]
I’ve confirmed this bug in 26.3 as well as a local build of 27.0.90.
Here’s a simple repro. Save this in a file and run check-declare-file.

[test.el (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40188; Package emacs. (Wed, 25 Mar 2020 22:20:02 GMT) Full text and rfc822 format available.

Message #11 received at 40188 <at> debbugs.gnu.org (full text, mbox):

From: Neil Okamoto <neil.okamoto <at> gmail.com>
To: 40188 <at> debbugs.gnu.org
Subject: Re: repro for Emacs 26.3 and 27.0.90
Date: Wed, 25 Mar 2020 15:19:44 -0700
[Message part 1 (text/plain, inline)]
;; repro for 40188:
;;      http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40188

;; evaluate:
;;     (check-declare-file "test.el")
;; yields:
;;     (("../../tmp/check-declare/some-file.el"
;;       ("/tmp/check-declare/test.el" "bar" "file not found")))
;; 
;; which omits the second declare-function, which is malformed 

(declare-function bar "some-file.el")
(declare-function foo ‘malformed)
;; end of file


> On Mar 25, 2020, at 2:41 PM, Neil Okamoto <neil.okamoto <at> gmail.com> wrote:
> 
> I’ve confirmed this bug in 26.3 as well as a local build of 27.0.90.
> Here’s a simple repro. Save this in a file and run check-declare-file.
> 
> <test.el>
> 
> 

[Message part 2 (text/html, inline)]

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 15 Apr 2020 15:24:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40188; Package emacs. (Tue, 10 Aug 2021 16:34:01 GMT) Full text and rfc822 format available.

Message #16 received at 40188 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Neil Okamoto <neil.okamoto <at> gmail.com>
Cc: 40188 <at> debbugs.gnu.org
Subject: Re: bug#40188: check-declare-files does not include malformed
 declarations in the list
Date: Tue, 10 Aug 2021 18:33:31 +0200
Neil Okamoto <neil.okamoto <at> gmail.com> writes:

> ;; repro for 40188:
> ;;      http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40188
>
> ;; evaluate:
> ;;     (check-declare-file "test.el")
> ;; yields:
> ;;     (("../../tmp/check-declare/some-file.el"
> ;;       ("/tmp/check-declare/test.el" "bar" "file not found")))
> ;; 
> ;; which omits the second declare-function, which is malformed 
>
> (declare-function bar "some-file.el")
> (declare-function foo ‘malformed)

Well, the doc string says that it "checks the veracity" of the
declare-function calls -- not that it checks whether they're malformed.

So I think the return value is working as intended.

However, it (now) pops up the following warning:

check.el:14:Warning (check-declare): said ‘foo’ was defined in unknown file:
    Malformed declaration

So it does warn about the malformed `declare-function' (but doesn't
include it in the return value).

I think this is probably working as intended on the whole, so I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 40188 <at> debbugs.gnu.org and Neil Okamoto <neil.okamoto <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 10 Aug 2021 16:34:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 08 Sep 2021 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.