abingham / flycheck-vale

Flycheck integration for the vale natural language linter
MIT License
64 stars 17 forks source link

Other syntax checkers not executed #10

Open stephanschubert opened 6 years ago

stephanschubert commented 6 years ago

I have flycheck-vale set up and also proselint for Markdown files but only the vale errors are showing now. Easy to test with:

more or less ...

with (setq flycheck-vale-enabled t) it complains about more or less, but when I (setq flycheck-vale-enabled nil) then proselint starts to complain about ....

EDIT Any markdownlint errors are also not showing up.

My flycheck setup:

  vale
    - may enable: yes
    - predicate:  nil
    - executable: Found at /usr/local/bin/vale

  proselint
    - may enable: yes
    - predicate:  t
    - executable: Found at /usr/local/bin/proselint

  markdown-markdownlint-cli
    - may enable:         yes
    - executable:         Found at /usr/local/bin/markdownlint

Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.

--------------------

Flycheck version: 32snapshot (package: 20180422.2106)
Emacs version:    27.0.50
System:           x86_64-apple-darwin17.4.0
Window system:    ns
abingham commented 6 years ago

Hmmm. I'm honestly not sure the right way to do this. A checker can specify chained checkers in its specification by using :next-checkers, but that means that flycheck-vale would need to directly reference proselint and markdown-lint. This feels over-specified to me.

I might be wrong, though. I'm definitely no flycheck expert. I see that there's a discussion about this topic on the flycheck issue tracker. Maybe they can shed some light on how this is supposed to work.

So I agree that what you're looking for should work, but I don't know the right way to do that. Do you have time to follow the thread a bit and see what "the right thing do to" is?

stephanschubert commented 6 years ago

@abingham Thanks for the quick answer.. I have looked into the discussion but it seems there's no resolution yet. The only option I see so far is disabling the proselint checker and using vale's proselint styles itself.

Won't help with the markdownlint checker though.

abingham commented 6 years ago

That's frustrating, but hopefully they'll sort this out soon on the flycheck end.

I guess it wouldn't be too hard to define a second checker in flycheck-vale.el that does use :next-checkers. We could call it vale-proselint-markdown or something equally explicit, and it could be a stopgap until there's a better solution. I'd be happy to stick that in flycheck-vale.el, or you could define it locally.