Causes Ale to display Perl :: Critical violations as warnings, not errors

I use vimwith the plugin Ale. By default, errors are perlcriticdisplayed as errors. I would like them to appear as warnings. According to :help g:ale_type_mapme, I should be able to do this, but it’s not clear to me exactly how.

let g:ale_type_map = {'perl': {'E': 'W'}}Changes errors perlto warnings.

let g:ale_type_map = {'perl': {'ES': 'WS'}}does not seem to affect criticism violations. None of them:

let g:ale_type_map = {'perlcritic': {'ES': 'WS', 'E': 'W'}}
let g:ale_type_map = {'perl_perlcritic': {'ES': 'WS', 'E': 'W'}}

The documents on this are pretty sparse, so I don’t understand if the problem is with the syntax, the Linter name, or something else.

+4
source share
1 answer

, perltidy, Perl::Critic:

let g:ale_type_map = {
\    'perl': {'ES': 'WS'}, 
\    'perlcritic': {'ES': 'WS', 'E': 'W'},
\}

, perl, Perl::Critic. perl , Perl::Critic, . , Perl::Critic . , Ale, , - .

, ale_type_map - dict, , , . - , , .

+1

Source: https://habr.com/ru/post/1685176/


All Articles