federicobond / solcheck

A Solidity linter written in JS
GNU General Public License v3.0
32 stars 7 forks source link

Add support for most relevant CLI options from eslint #4

Open federicobond opened 7 years ago

maurelian commented 7 years ago

Would this include something that allows me to choose how many lines to show before/after the error?

ie.

error: Add explicit visibility specifier to function (no-implicit-visibility) at <input>:501:5:
> 501 |     function getUnavailableTakerTokenAmount(bytes32 orderHash)
      |     ^

instead of:

error: Add explicit visibility specifier to function (no-implicit-visibility) at <input>:501:5:
  499 |     /// @param orderHash The Keccak-256 hash of the given order.
  500 |     /// @return Sum of values already filled and cancelled.
> 501 |     function getUnavailableTakerTokenAmount(bytes32 orderHash)
      |     ^
  502 |         constant
  503 |         returns (uint unavailableTakerTokenAmount)
  504 |     {
federicobond commented 7 years ago

I don't have much control over the output of the formatters, but you can now try using -f/--format in latest master. All formatters defined for eslint should be supported.

solchecker --format stylish contracts/*