Open dannyob opened 1 year ago
I attempted this workaround, but it didn't seem to work. I tried to set it via:
(add-to-list 'package-lint--allowed-prefix-mappings '("transducers-" . ("t-")))
But functions like package-lint-current-buffer
still report all the prefixing errors.
For package-lint
, you need to omit the trailing hyphen that you include in read-symbol-shorthands
, so try
(add-to-list 'package-lint--allowed-prefix-mappings '("transducers" . ("t")))
That's odd, given that the original defvar
doesn't seem to follow that convention:
(defvar package-lint--allowed-prefix-mappings
'(("ob-" . ("org-"))
("oc-" . ("org-"))
("ol-" . ("org-"))
("ox-" . ("org-")))
"Alist containing mappings of package prefixes to symbol prefixes.")
That worked though, thank you!
Thanks to shorthands, it's now possible for the prefix of a source file's definitions to not match their actual prefixes -- i.e. if you set
read-symbol-shorthands
to(("vlp-" . "very-long-prefix-"))
in the file very-long-prefix.el, then definitions that are named "vlp-foobar" will be transformed into "very-long-prefix-foobar."This confuses package-lint's package checker. As a hack, I was able to remove the warnings by adding, e.g,
("very-long-prefix" . ("vlp"))
topackage-lint--allowed-prefix-mappings
. I think a better fix would have to start by adding a clause topackage-lint--valid-definition-name-p
but I'm too much of an emacs lisp newbie to be confident of what to do here!