Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO: Validate formatter names #160

Open
lassik opened this issue Sep 17, 2021 · 0 comments
Open

TODO: Validate formatter names #160

lassik opened this issue Sep 17, 2021 · 0 comments

Comments

@lassik
Copy link
Owner

lassik commented Sep 17, 2021

If you do:

(setq format-all-formatters '(("HTML" no-such-formatter)))

and then run M-x format-all-buffer, you get the confusing error:

Debugger entered--Lisp error: (void-function nil)
  nil(nil "HTML" nil)
  funcall(nil nil "HTML" nil)

That's because format-all doesn't check if the formatter exists. We should.

We should also ensure that command line arguments are not passed to a formatter that doesn't run an external program. For example, you can't pass command line arguments to the Emacs Lisp formatter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant