From 7302bedc5edb814c183109422271151af7ad7495 Mon Sep 17 00:00:00 2001 From: Jeff Sutherland Date: Thu, 14 Sep 2017 00:45:18 +0700 Subject: [PATCH] Add solidity linter: solium --- README.md | 1 + ale_linters/solidity/solium.vim | 9 +++++++++ doc/ale-solidity.txt | 16 ++++++++++++++++ doc/ale.txt | 3 +++ 4 files changed, 29 insertions(+) create mode 100644 ale_linters/solidity/solium.vim create mode 100644 doc/ale-solidity.txt diff --git a/README.md b/README.md index e90fa28..32ab204 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ formatting. | Scala | [scalac](http://scala-lang.org), [scalastyle](http://www.scalastyle.org) | | Slim | [slim-lint](https://github.com/sds/slim-lint) | SML | [smlnj](http://www.smlnj.org/) | +| Solidity | [solium](https://github.com/duaraghav8/Solium) | | Stylus | [stylelint](https://github.com/stylelint/stylelint) | | SQL | [sqlint](https://github.com/purcell/sqlint) | | Swift | [swiftlint](https://github.com/realm/SwiftLint), [swiftformat](https://github.com/nicklockwood/SwiftFormat) | diff --git a/ale_linters/solidity/solium.vim b/ale_linters/solidity/solium.vim new file mode 100644 index 0000000..61ab184 --- /dev/null +++ b/ale_linters/solidity/solium.vim @@ -0,0 +1,9 @@ +" Author: Jeff Sutherland - https://github.com/jdsutherland +" Description: Report errors in Solidity code with solium + +call ale#linter#Define('solidity', { +\ 'name': 'solium', +\ 'executable': 'solium', +\ 'command': 'solium --reporter gcc --file %t', +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\}) diff --git a/doc/ale-solidity.txt b/doc/ale-solidity.txt new file mode 100644 index 0000000..3dea123 --- /dev/null +++ b/doc/ale-solidity.txt @@ -0,0 +1,16 @@ +=============================================================================== +ALE Solidity Integration *ale-solidity-options* + + +=============================================================================== +solium *ale-solidity-solium* + + Use of Solium linter for Solidity source code requires a .soliumrc.json + file in project root. This file can be generated by running `solium --init`. + See the corresponding solium usage for detailed instructions + (https://github.com/duaraghav8/Solium#usage). + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/doc/ale.txt b/doc/ale.txt index ae3aa48..32ef0a6 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -146,6 +146,8 @@ CONTENTS *ale-contents* shellcheck..........................|ale-sh-shellcheck| sml...................................|ale-sml-options| smlnj...............................|ale-sml-smlnj| + solidity..............................|ale-solidity-options| + solium..............................|ale-solidity-solium| spec..................................|ale-spec-options| rpmlint.............................|ale-spec-rpmlint| stylus................................|ale-stylus-options| @@ -275,6 +277,7 @@ Notes: * Scala: `scalac`, `scalastyle` * Slim: `slim-lint` * SML: `smlnj` +* Solidity: `solium` * Stylus: `stylelint` * SQL: `sqlint` * Swift: `swiftlint`, `swiftformat`