[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs Lisp Linter fail to identify function defined in a "use-packag
From: |
Emanuel Berg |
Subject: |
Re: Emacs Lisp Linter fail to identify function defined in a "use-package" block |
Date: |
Wed, 11 Oct 2023 02:59:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Kiong-Gē Liāu wrote:
> I found that the built-in Emacs lisp linter [...]
If we are talking `elint-current-buffer', I just tried it on
a couple of my Elisp files. Most of them has warnings of the
type
Reference to unbound symbol
or
Setting previously unbound symbol
and indeed, even running it on elint.el itself produces such
warnings - but these warnings are not reported by the
byte-compiler and also do not cause problems in practice.
I don't know what one is supposed to do to with them,
`require' even more files than the byte-compiler demands?
It also reports errors like this for functions with &rest
arguments, apparently the linter does think they
are mandatory,
Wrong number of args: (cl-remove 32 (string-to-list abc)),
(ITEM SEQ [KEYWORD &rest VALUE])
Elint was written in 1997, it is likely the situation was
quite different back then, maybe that is the explanation.
But I think the byte compiler should be the de facto linter,
instead of improving elint.el (and `checkdoc' for that matter)
whatever good stuff are in those should be incorporated into
the byte compiler to have all the tidying up at one place.
Now we also get warnings from the native-compiler - where does
it all end? In one and only one place - would be optimal for
me, at least.
But cred to Emacs hackers be it 1997 or 2023!
--
underground experts united
https://dataswamp.org/~incal