vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

Any reason to have syntastic_check_on_wq on by default? #2386

Closed l29ah closed 2 years ago

l29ah commented 2 years ago

It seems to be a completely unreasonable behavior that doesn't deserve its own configuration options, but nevertheless not only the option is present, it's enabled by default, forcing every single user to change it.

lcd047 commented 2 years ago

Now that you mention it I'm not sure it's reasonable to ask design questions about a project that has been dead for a few years now (hint: have you looked at ALE?). :smile: But there's also no reason not to answer such questions as long as it doesn't take too much time.

The rationale behind the existence of check_on_wq is that you might make a last-minute change that is a syntax error, save the file with :wq, and then go on your merry way thinking syntastic has validated your project and everything is fine. Some people were concerned about that scenario and asked for check_on_wq.

Tangentially related: a few months ago there was a change in Vim affecting the the QuitPre logic, simply because somebody thought all autocmds should be run the same way. I have suspected ever since that said change broke check_on_wq in a way that can't be fixed, but I haven't bothered to check. So perhaps Vim developers have granted your wish inadvertently.

Back to the initial question: check_on_wq aside, there are variables and defaults in syntastic that make no sense whatsoever these days and that only exist for historic reasons (example: always_populate_loc_list). They are still with us because by the nature of syntastic there is no default configuration that would be considered reasonable for all (or even for most) users, and because "WTF did they broke today" is more annoying than you writing a line in a file once and then forgetting about it for the entire life of the project. Hope that helps. :smile: