test_phpcs_handler.vader
1 Before: 2 runtime ale_linters/php/phpcs.vim 3 4 After: 5 call ale#linter#Reset() 6 7 Execute(phpcs errors should be handled): 8 AssertEqual 9 \ [ 10 \ { 11 \ 'lnum': 18, 12 \ 'col': 3, 13 \ 'type': 'E', 14 \ 'sub_type': 'style', 15 \ 'text': 'Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)', 16 \ }, 17 \ { 18 \ 'lnum': 22, 19 \ 'col': 3, 20 \ 'type': 'E', 21 \ 'sub_type': 'style', 22 \ 'text': 'All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks)', 23 \ }, 24 \ ], 25 \ ale_linters#php#phpcs#Handle(bufnr(''), [ 26 \ '/path/to/some-filename.php:18:3: error - Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)', 27 \ "/path/to/some-filename.php:22:3: error - All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '\"\n'.", 28 \ ])