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

Scilla syntax checker #2266

Closed bogdan closed 5 years ago

bogdan commented 5 years ago

Scilla is a programming language of Zilliqa blockchain

https://scilla-lang.org/

lcd047 commented 5 years ago

Scilla isn't something I can check easily, and it seems pretty specialized. Consequently this checker is probably best fit for staying external.

A couple of suggestions though:

bogdan commented 5 years ago

Ok, I applied all your suggestions. You may or may not merge it... that is fine. I just got it online if someone would need it and can quickly copypaste without knowing all syntastic details.

It would be easier if I can make such generic checkers in single line like:

call g:SyntasticRegistry.CreateAndRegisterChecker({
    \ 'filetype': 'scilla',
    \ 'name': 'scillachecker',
    \ 'exec': 'scilla-checker',
    \ 'errorformat': '%f:%l:%c:%m'})

That would make me feel like it is not worth inventing a vim plugin.

lcd047 commented 5 years ago

It's possible, provided you're willing to give up some functionality: :h write-compiler-plugin.

bogdan commented 5 years ago

Well, I don't want to give up functionality obviously... I just think that my code can be 5x shorter if CreateAndRegisterChecker would support errorformat option. I think many syntax checkers can be 1 line of code if CreateAndRegisterChecker would support all the options of makergBuild and SyntasticMake.

lcd047 commented 5 years ago

Since you insist on turning this into an issue: I just run a quick grep through the code. Currently, out of 187 core checkers that use makeprgBuild(), 40 are calling makeprgBuild({}). Out of these, 9 also have a trivial SyntasticMake() and nothing in between, and would benefit from your suggestion. Fortunately syntastic design wasn't optimized for your preferences.

Unrelated: as you might have noticed, syntastic is all but dead. People seem to use ALE these days.