A doom module and config linter

With the advent of flymake it makes sense to discuss a proper linter for the doom project. This linter would take a buffer and analyse each form within the buffer for small mistakes and code smells.

some examples of this may be

  • using use-package instead of use-package!
  • using eval-when-compile instead of after!
  • many map! mistakes, for example using :prefix-map instead of :prefix

The actual flymake backend will be trivial to write and the analyser I have a basic idea for the abstraction. What we will need are these smells and mistakes in all doom related files. if people can add them below that will be a help.

Thanks. I will keep this post updated.

Think it could be good for doom doctor to call & report from it too

yeah, enable a linter in an init.el when warnings are being issued

Which doom doctor would also call & report from, yes

We are on the same page

I wonder if it is possible to turn use-package-lint into a flymake checker. Right now I have it as an after-save-hook but getting the results along with rest of flymake diagnostics would be better. It probably doesn’t work with use-package! without adjusting use-package-form-regexp-eval.

This is not a bad shout. as its just a function it should be fine. we can also adapt the regex but I would need to check if doom does any funky business first