diff options
author | JoseGRuiz <joseruiz75211@hotmail.com> | 2023-07-24 07:43:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 21:43:13 +0900 |
commit | 481c5cccbf48f6df97cfa1489e811438b4f2f088 (patch) | |
tree | 885fd2e55633239a85e4256cae083b29573e699f /ale_linters/glsl | |
parent | 93a4f70414cf6b632083127998ad5c80b1615e2e (diff) | |
download | ale-481c5cccbf48f6df97cfa1489e811438b4f2f088.zip |
fixed parsing errors when certain options are used in glslangValidator (#4540)
* fixed parsing errors when certain options are used in glslang
* Update glslang.vim
set column number to 0 like it is always set by glslangValidator
* Added a test for the handler of glslangValidator
Diffstat (limited to 'ale_linters/glsl')
-rw-r--r-- | ale_linters/glsl/glslang.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ale_linters/glsl/glslang.vim b/ale_linters/glsl/glslang.vim index bbddce90..54fc0caa 100644 --- a/ale_linters/glsl/glslang.vim +++ b/ale_linters/glsl/glslang.vim @@ -17,13 +17,15 @@ function! ale_linters#glsl#glslang#Handle(buffer, lines) abort " Matches patterns like the following: " " ERROR: 0:5: 'foo' : undeclared identifier - let l:pattern = '^\(.\+\): \(\d\+\):\(\d\+\): \(.\+\)' + " or when using options like -V or -G or --target-env + " ERROR: filename:5: 'foo' : undeclared identifier + let l:pattern = '^\(.\+\): \(.\+\):\(\d\+\): \(.\+\)' let l:output = [] for l:match in ale#util#GetMatches(a:lines, l:pattern) call add(l:output, { \ 'lnum': str2nr(l:match[3]), - \ 'col': str2nr(l:match[2]), + \ 'col' : 0, \ 'text': l:match[4], \ 'type': l:match[1] is# 'ERROR' ? 'E' : 'W', \}) |