@@ -3,6 +3,7 @@ Given (Some invalid lines of PHP):
3
3
class Foo { / }
4
4
$foo)
5
5
['foo' 'bar']
6
+ function count() {}
6
7
7
8
Execute(The php handler should parse lines correctly):
8
9
runtime ale_linters/php/php.vim
@@ -39,6 +40,13 @@ Execute(The php handler should parse lines correctly):
39
40
\ },
40
41
\ {
41
42
\ 'bufnr': 347,
43
+ \ 'lnum': 5,
44
+ \ 'col': 0,
45
+ \ 'text': "Cannot redeclare count()",
46
+ \ 'type': 'E',
47
+ \ },
48
+ \ {
49
+ \ 'bufnr': 347,
42
50
\ 'lnum': 21,
43
51
\ 'col': 0,
44
52
\ 'text': "syntax error, unexpected end of file",
@@ -54,10 +62,12 @@ Execute(The php handler should parse lines correctly):
54
62
\ ],
55
63
\ ale_linters#php#php#Handle(347, [
56
64
\ 'This line should be ignored completely',
65
+ \ "Parse error: syntax error, This line should be ignored completely in - on line 1",
57
66
\ "PHP Parse error: syntax error, unexpected ';', expecting ']' in - on line 1",
58
67
\ "PHP Parse error: syntax error, unexpected '/', expecting function (T_FUNCTION) or const (T_CONST) in - on line 2",
59
68
\ "PHP Parse error: syntax error, unexpected ')' in - on line 3",
60
69
\ "PHP Parse error: syntax error, unexpected ''bar'' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in - on line 4",
70
+ \ "PHP Fatal error: Cannot redeclare count() in - on line 5",
61
71
\ 'PHP Parse error: syntax error, unexpected end of file in - on line 21',
62
72
\ 'PHP Parse error: Invalid numeric literal in - on line 47',
63
73
\ ])
0 commit comments