diff options
-rw-r--r-- | ale_linters/javascript/eslint.vim | 10 | ||||
-rw-r--r-- | test/test_linting_updates_loclist.vader | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim index c5a25555..d57b84ad 100644 --- a/ale_linters/javascript/eslint.vim +++ b/ale_linters/javascript/eslint.vim @@ -25,14 +25,8 @@ function! ale_linters#javascript#eslint#Handle(buffer, lines) continue endif - let l:text = l:match[3] - let l:marker = l:match[4] - let l:marker_parts = split(l:marker, '/') - let l:type = l:marker_parts[0] - - if len(l:marker_parts) == 2 - let l:text = l:text . ' (' . l:marker_parts[1] . ')' - endif + let l:type = split(l:match[4], '/')[0] + let l:text = l:match[3] . ' [' . l:match[4] . ']' " vcol is Needed to indicate that the column is a character. call add(l:output, { diff --git a/test/test_linting_updates_loclist.vader b/test/test_linting_updates_loclist.vader index 9c39c30c..920a4e46 100644 --- a/test/test_linting_updates_loclist.vader +++ b/test/test_linting_updates_loclist.vader @@ -4,7 +4,7 @@ Given javascript (Some JavaScript with problems): Before: let g:ale_buffer_loclist_map = {} - let g:expected_data = {bufnr('%'): [{'lnum': 1, 'bufnr': bufnr('%'), 'vcol': 0, 'linter_name': 'eslint', 'nr': -1, 'type': 'W', 'col': 10, 'text': 'Infix operators must be spaced. (space-infix-ops)'}, {'lnum': 2, 'bufnr': bufnr('%'), 'vcol': 0, 'linter_name': 'eslint', 'nr': -1, 'type': 'E', 'col': 10, 'text': 'Missing semicolon. (semi)'}]} + let g:expected_data = {bufnr('%'): [{'lnum': 1, 'bufnr': bufnr('%'), 'vcol': 0, 'linter_name': 'eslint', 'nr': -1, 'type': 'W', 'col': 10, 'text': 'Infix operators must be spaced. [Warning/space-infix-ops]'}, {'lnum': 2, 'bufnr': bufnr('%'), 'vcol': 0, 'linter_name': 'eslint', 'nr': -1, 'type': 'E', 'col': 10, 'text': 'Missing semicolon. [Error/semi]'}]} After: let g:ale_buffer_loclist_map = {} |