2017-11-13 11:08:09 -05:00
|
|
|
Before:
|
|
|
|
runtime ale_linters/shell/shellcheck.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The shellcheck handler should handle basic errors or warnings):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 1,
|
|
|
|
\ 'type': 'W',
|
2017-11-15 12:26:52 -05:00
|
|
|
\ 'text': 'In POSIX sh, ''let'' is not supported.',
|
|
|
|
\ 'code': 'SC2039',
|
2017-11-13 11:08:09 -05:00
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 3,
|
|
|
|
\ 'type': 'E',
|
2017-11-15 12:26:52 -05:00
|
|
|
\ 'text': 'Don''t put spaces around the = in assignments.',
|
|
|
|
\ 'code': 'SC1068',
|
2017-11-13 11:08:09 -05:00
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale_linters#sh#shellcheck#Handle(bufnr(''), [
|
|
|
|
\ '-:2:1: warning: In POSIX sh, ''let'' is not supported. [SC2039]',
|
|
|
|
\ '-:2:3: error: Don''t put spaces around the = in assignments. [SC1068]',
|
|
|
|
\ ])
|
|
|
|
|
|
|
|
Execute(The shellcheck handler should handle notes):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 3,
|
|
|
|
\ 'col': 3,
|
|
|
|
\ 'type': 'I',
|
2017-11-15 12:26:52 -05:00
|
|
|
\ 'text': 'Double quote to prevent globbing and word splitting.',
|
|
|
|
\ 'code': 'SC2086',
|
2017-11-13 11:08:09 -05:00
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale_linters#sh#shellcheck#Handle(bufnr(''), [
|
|
|
|
\ '-:3:3: note: Double quote to prevent globbing and word splitting. [SC2086]',
|
|
|
|
\ ])
|