diff --git a/README.markdown b/README.markdown index 92a850cf..b9bdc7e0 100644 --- a/README.markdown +++ b/README.markdown @@ -65,7 +65,7 @@ JSX, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown, MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG, -reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Sphinx, SQL, +reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity, Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80, Zope page templates, and Zsh. See the [manual][checkers] for details about the corresponding supported diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index 19974054..91f090e8 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -101,6 +101,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang* Sh.......................................|syntastic-checkers-sh| Slim.....................................|syntastic-checkers-slim| SML......................................|syntastic-checkers-sml| + Solicity.................................|syntastic-checkers-solicity| SQL......................................|syntastic-checkers-sql| Stylus...................................|syntastic-checkers-stylus| @@ -5779,6 +5780,29 @@ Checker options~ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. +============================================================================== +SYNTAX CHECKERS FOR SOLIDITY *syntastic-checkers-solidity* + +The following checkers are available for Solidity (filetype "sol"): + + 1. SOLC.....................|syntastic-solidity-solc| + +------------------------------------------------------------------------------ +1. Solc *syntastic-solidity-solc* + +Name: solc +Maintainer: Jacob Cholewa + +"Solc" is a compiler for the Etherium Smart-Contract language Solidity. +See the project's page for details: + + https://github.com/ethereum/solidity + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + ============================================================================== SYNTAX CHECKERS FOR SQL *syntastic-checkers-sql* diff --git a/plugin/syntastic/registry.vim b/plugin/syntastic/registry.vim index 8e78f112..bcfd5c63 100644 --- a/plugin/syntastic/registry.vim +++ b/plugin/syntastic/registry.vim @@ -85,6 +85,7 @@ let s:_DEFAULT_CHECKERS = { \ 'slim': ['slimrb'], \ 'sml': ['smlnj'], \ 'spec': ['rpmlint'], + \ 'solidity': ['solc'], \ 'sql': ['sqlint'], \ 'stylus': ['stylint'], \ 'tcl': ['nagelfar'], diff --git a/syntax_checkers/solidity/solc.vim b/syntax_checkers/solidity/solc.vim new file mode 100644 index 00000000..3b47101d --- /dev/null +++ b/syntax_checkers/solidity/solc.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: solc.vim +"Description: Solidity syntax checker - using solc +"Maintainer: Jacob Cholewa +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"============================================================================ + +if exists('g:loaded_syntastic_solidity_solc_checker') + finish +endif +let g:loaded_syntastic_solidity_solc_checker = 1 + + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_solidity_solc_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = '%f:%l:%c: Error: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'solidity', + \ 'name': 'solc' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: