1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
Before:
runtime ale_linters/fish/fish.vim
After:
call ale#linter#Reset()
Execute(The fish handler should handle basic warnings and syntax errors):
AssertEqual
\ [
\ {
\ 'lnum': 20,
\ 'col': 23,
\ 'text': "Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.",
\ },
\ {
\ 'lnum': 26,
\ 'col': 7,
\ 'text': "Illegal command name '(prompt_pwd)'",
\ },
\ {
\ 'lnum': 36,
\ 'col': 1,
\ 'text': "'end' outside of a block",
\ },
\ ],
\ ale_linters#fish#fish#Handle(1, [
\ "fish_prompt.fish (line 20): Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.",
\ 'if set -q SSH_CLIENT || set -q SSH_TTY',
\ ' ^',
\ "fish_prompt.fish (line 26): Illegal command name '(prompt_pwd)'",
\ ' (prompt_pwd) \',
\ ' ^',
\ "fish_prompt.fish (line 36): 'end' outside of a block",
\ 'end',
\ '^',
\ 'config.fish (line 45):',
\ "abbr --add p 'cd ~/Projects'",
\ '^',
\ ])
Execute(The fish handler should handle problems where the problem before before the line with the line number):
AssertEqual
\ [
\ {
\ 'lnum': 2,
\ 'col': 23,
\ 'text': 'Unsupported use of ''||''. In fish, please use ''COMMAND; or COMMAND''.',
\ },
\ {
\ 'lnum': 5,
\ 'col': 1,
\ 'text': 'wat',
\ },
\ ],
\ ale_linters#fish#fish#Handle(bufnr(''), [
\ 'Unsupported use of ''||''. In fish, please use ''COMMAND; or COMMAND''.',
\ '/tmp/vLz620o/258/test.fish (line 2): if set -q SSH_CLIENT || set -q SSH_TTY',
\ ' ^',
\ '/tmp/vLz620o/258/test.fish (line 5): wat',
\ ' ^',
\ ])
|