Fix #4499 - Fix solhint >= 3.4.0

Fix solhint for versions >= 3.4.0, while still supporting older
versions.

The solhint linter code has been moved out of the `handlers` directory
as it does not need to be shared between different filetypes. Code has
been simplified.

Co-authored-by: Henrique Barcelos <16565602+hbarcelos@users.noreply.github.com>
This commit is contained in:
w0rp
2023-09-17 17:24:23 +01:00
parent bd9fc580a1
commit 53b01d6a54
4 changed files with 88 additions and 118 deletions

View File

@@ -1,8 +1,7 @@
Before:
call ale#assert#SetUpLinterTest('solidity', 'solhint')
runtime autoload/ale/handlers/solhint.vim
let b:args = ' --formatter compact %s'
let b:args = ' --formatter unix %s'
After:
unlet! b:args
@@ -18,7 +17,6 @@ Execute(The options should be configurable):
AssertLinter 'solhint', ale#Escape('solhint') . ' --foobar' . b:args
Execute(solhint should be run from a containing project with solhint executable):
call ale#test#SetFilename('../test-files/solhint/Contract.sol')