msherry / flycheck-pycheckers

Multiple syntax checker for Python in Emacs, using Flycheck
GNU General Public License v3.0
63 stars 23 forks source link

*_command not taken into account when validating whether checker exists #53

Closed posita closed 4 years ago

posita commented 4 years ago

The {}_command parameter is not taken into account when when calling self._executable_exists() in pycheckers.py#L440. It's first considered via self.construct_args(…) which doesn't happen until pycheckers.py#L459. The net effect is that if you're overriding, e.g., mypy_command = /usr/local/bin/mypy-daemon as documented, you still need to have an executable called mypy (or dmypy, depending) somewhere in your path, even if it will never be called. (Consider the work-around where you do something like ln -s /bin/true /usr/local/bin/mypy.)

msherry commented 4 years ago

Oh, good catch. I'll see if I can get a fix up later this week (pull requests gratefully accepted as well, of course :) )

I don't really want to be splitting up the {}_command param into parts and checking if the first one exists, since that sounds ugly. Would it make sense to just not do the existence check if the user has provided their own command?

posita commented 4 years ago

Oh, good catch. I'll see if I can get a fix up later this week (pull requests gratefully accepted as well, of course :) )

I don't really want to be splitting up the {}_command param into parts and checking if the first one exists, since that sounds ugly. Would it make sense to just not do the existence check if the user has provided their own command?

Ah, crap. I just submitted #54 that does exactly that. Let me check to see what happens if the check is omitted and see what the UX is like.