2021-04-15 00:01:18 +00:00
|
|
|
Before:
|
|
|
|
call ale#assert#SetUpLinterTest('solidity', 'solhint')
|
|
|
|
|
2023-09-17 16:24:23 +00:00
|
|
|
let b:args = ' --formatter unix %s'
|
2021-04-15 00:01:18 +00:00
|
|
|
|
|
|
|
After:
|
|
|
|
unlet! b:args
|
|
|
|
unlet! b:executable
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
|
|
|
Execute(The default command should be correct):
|
|
|
|
AssertLinterCwd ''
|
|
|
|
AssertLinter 'solhint', ale#Escape('solhint') . b:args
|
|
|
|
|
|
|
|
Execute(The options should be configurable):
|
|
|
|
let g:ale_solidity_solhint_options = '--foobar'
|
|
|
|
|
|
|
|
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')
|
|
|
|
|
|
|
|
let b:executable = ale#path#Simplify(g:dir . '/../test-files/solhint/node_modules/.bin/solhint')
|
|
|
|
|
|
|
|
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/solhint')
|
|
|
|
AssertLinter b:executable, ale#Escape(b:executable) . b:args
|