diff options
author | Yuto <git@aiotter.com> | 2020-04-18 19:59:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 11:59:26 +0100 |
commit | 93a13d73538c05cdf26183bf96be29155e780dd2 (patch) | |
tree | b93801d56577bb913ae49d581b19fb5fdd11bb42 /autoload/ale.vim | |
parent | 198361bc0da6f13d1ea5f699fc202c981e97b861 (diff) | |
download | ale-93a13d73538c05cdf26183bf96be29155e780dd2.zip |
Broken message in pycodestyle (or any other Linters whose name include 'code') (#3114)
* Swap substitution order for echoed message
This prevents 'code' string in liter_name to be substituted by accident.
Linters including pycodestyle have been affected by this problem.
* Add test for linter whose name contains 'code'
Test for c525db8cb4088d02448c5ddcf4a80ffa028c3181
Diffstat (limited to 'autoload/ale.vim')
-rw-r--r-- | autoload/ale.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/ale.vim b/autoload/ale.vim index ee1a0d54..01e17b15 100644 --- a/autoload/ale.vim +++ b/autoload/ale.vim @@ -258,9 +258,9 @@ function! ale#GetLocItemMessage(item, format_string) abort " Replace special markers with certain information. " \=l:variable is used to avoid escaping issues. + let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g') let l:msg = substitute(l:msg, '\V%severity%', '\=l:severity', 'g') let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g') - let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g') " Replace %s with the text. let l:msg = substitute(l:msg, '\V%s', '\=a:item.text', 'g') |