mirror of https://github.com/dense-analysis/ale
Merge pull request #2809 from hsanson/2802-fix-sign-group-parsing
Fix sign parser to be language independent.
This commit is contained in:
commit
a486aa1d24
|
@ -178,11 +178,12 @@ function! ale#sign#ParsePattern() abort
|
||||||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
||||||
" Matches output like :
|
" Matches output like :
|
||||||
" line=4 id=1 group=ale name=ALEErrorSign
|
" line=4 id=1 group=ale name=ALEErrorSign
|
||||||
" строка=1 id=1000001 group=ale имя=ALEErrorSign
|
" строка=1 id=1000001 группа=ale имя=ALEErrorSign
|
||||||
" 行=1 識別子=1000001 group=ale 名前=ALEWarningSign
|
" 行=1 識別子=1000001 グループ=ale 名前=ALEWarningSign
|
||||||
" línea=12 id=1000001 group=ale nombre=ALEWarningSign
|
" línea=12 id=1000001 grupo=ale nombre=ALEWarningSign
|
||||||
" riga=1 id=1000001 group=ale nome=ALEWarningSign
|
" riga=1 id=1000001 gruppo=ale nome=ALEWarningSign
|
||||||
let l:pattern = '\v^.*\=(\d+).*\=(\d+).*group\=ale.*\=(ALE[a-zA-Z]+Sign)'
|
" Zeile=235 id=1000001 Gruppe=ale Name=ALEErrorSign
|
||||||
|
let l:pattern = '\v^.*\=(\d+).*\=(\d+).*\=ale>.*\=(ALE[a-zA-Z]+Sign)'
|
||||||
else
|
else
|
||||||
" Matches output like :
|
" Matches output like :
|
||||||
" line=4 id=1 name=ALEErrorSign
|
" line=4 id=1 name=ALEErrorSign
|
||||||
|
@ -190,6 +191,7 @@ function! ale#sign#ParsePattern() abort
|
||||||
" 行=1 識別子=1000001 名前=ALEWarningSign
|
" 行=1 識別子=1000001 名前=ALEWarningSign
|
||||||
" línea=12 id=1000001 nombre=ALEWarningSign
|
" línea=12 id=1000001 nombre=ALEWarningSign
|
||||||
" riga=1 id=1000001 nome=ALEWarningSign
|
" riga=1 id=1000001 nome=ALEWarningSign
|
||||||
|
" Zeile=235 id=1000001 Name=ALEErrorSign
|
||||||
let l:pattern = '\v^.*\=(\d+).*\=(\d+).*\=(ALE[a-zA-Z]+Sign)'
|
let l:pattern = '\v^.*\=(\d+).*\=(\d+).*\=(ALE[a-zA-Z]+Sign)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ Execute (Parsing Russian signs should work):
|
||||||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[1, 1000001, 'ALEErrorSign']]],
|
\ [0, [[1, 1000001, 'ALEErrorSign']]],
|
||||||
\ ale#sign#ParseSigns([' строка=1 id=1000001 group=ale имя=ALEErrorSign'])
|
\ ale#sign#ParseSigns([' строка=1 id=1000001 группа=ale имя=ALEErrorSign'])
|
||||||
else
|
else
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[1, 1000001, 'ALEErrorSign']]],
|
\ [0, [[1, 1000001, 'ALEErrorSign']]],
|
||||||
|
@ -30,7 +30,7 @@ Execute (Parsing Japanese signs should work):
|
||||||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
||||||
\ ale#sign#ParseSigns([' 行=1 識別子=1000001 group=ale 名前=ALEWarningSign'])
|
\ ale#sign#ParseSigns([' 行=1 識別子=1000001 グループ=ale 名前=ALEWarningSign'])
|
||||||
else
|
else
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
||||||
|
@ -41,7 +41,7 @@ Execute (Parsing Spanish signs should work):
|
||||||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[12, 1000001, 'ALEWarningSign']]],
|
\ [0, [[12, 1000001, 'ALEWarningSign']]],
|
||||||
\ ale#sign#ParseSigns([' línea=12 id=1000001 group=ale nombre=ALEWarningSign'])
|
\ ale#sign#ParseSigns([' línea=12 id=1000001 grupo=ale nombre=ALEWarningSign'])
|
||||||
else
|
else
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[12, 1000001, 'ALEWarningSign']]],
|
\ [0, [[12, 1000001, 'ALEWarningSign']]],
|
||||||
|
@ -52,13 +52,24 @@ Execute (Parsing Italian signs should work):
|
||||||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
||||||
\ ale#sign#ParseSigns([' riga=1 id=1000001, group=ale nome=ALEWarningSign'])
|
\ ale#sign#ParseSigns([' riga=1 id=1000001, gruppo=ale nome=ALEWarningSign'])
|
||||||
else
|
else
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
\ [0, [[1, 1000001, 'ALEWarningSign']]],
|
||||||
\ ale#sign#ParseSigns([' riga=1 id=1000001, nome=ALEWarningSign'])
|
\ ale#sign#ParseSigns([' riga=1 id=1000001, nome=ALEWarningSign'])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Execute (Parsing German signs should work):
|
||||||
|
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
||||||
|
AssertEqual
|
||||||
|
\ [0, [[235, 1000001, 'ALEErrorSign']]],
|
||||||
|
\ ale#sign#ParseSigns([' Zeile=235 id=1000001 Gruppe=ale Name=ALEErrorSign'])
|
||||||
|
else
|
||||||
|
AssertEqual
|
||||||
|
\ [0, [[235, 1000001, 'ALEErrorSign']]],
|
||||||
|
\ ale#sign#ParseSigns([' Zeile=235 id=1000001 Name=ALEErrorSign'])
|
||||||
|
endif
|
||||||
|
|
||||||
Execute (The sign parser should indicate if the dummy sign is set):
|
Execute (The sign parser should indicate if the dummy sign is set):
|
||||||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614'))
|
||||||
AssertEqual
|
AssertEqual
|
||||||
|
|
Loading…
Reference in New Issue