purcell / flycheck-package

Flycheck checker for elisp package metadata
40 stars 3 forks source link

flycheck-package and ;; Package-requires: declarations #10

Open mooseyboots opened 1 year ago

mooseyboots commented 1 year ago

when i use this, i get errors about any dependencies in ;; Package-requires: declarations, saying that "Package X is not installable", even if the package is installed and loaded. the problem is probably that i have installed the packages with straight.el.

my config:

(use-package flycheck-package)

(use-package flycheck
  :config
  (setq flycheck-emacs-lisp-load-path 'inherit)
  (flycheck-package-setup))

Even though straight adds its packages to the load-path, flycheck-package can't seem to see them.

I installed a particularly dependency via package.el, restarted flycheck, and the error disappeared.

Is it possible to have flycheck-package take note of straight.el installed packages for linting? or is there another workaround for this issue?

purcell commented 1 year ago

If it's not installed with package.el, it's not technically a known package, perhaps? What does M-: (package-installed-p 'yourdependency) report?

mooseyboots commented 1 year ago

if i haven't installed it via package.el, it returns nil.

is there a way do disable just that check?

one issue i had with such checks is that if flycheck had such an error early on in a file, it wouldn't show all subsequent issues: if i made the early error disappear, it would find more issues in the file than if i didn't make it disappear. i don't mind that much if straight.el packages aren't found, my main concern is not wanting to ruin my linting checks, as they help me write less amateur code.