Fix #536 - Implement linter problem type re-mapping
This commit is contained in:
29
doc/ale.txt
29
doc/ale.txt
@@ -745,6 +745,35 @@ g:ale_sign_warning *g:ale_sign_warning*
|
||||
The sign for warnings in the sign gutter.
|
||||
|
||||
|
||||
g:ale_type_map *g:ale_type_map*
|
||||
*b:ale_type_map*
|
||||
Type: |Dictionary|
|
||||
Default: `{}`
|
||||
|
||||
This option can be set re-map problem types for linters. Each key in
|
||||
the |Dictionary| should be the name of a linter, and each value must be
|
||||
a |Dictionary| mapping error types from one type to another. The
|
||||
following types are supported:
|
||||
|
||||
`'E'` - `{'type': 'E'}`
|
||||
`'ES'` - `{'type': 'E', 'sub_type': 'style'}`
|
||||
`'W'` - `{'type': 'W'}`
|
||||
`'WS'` - `{'type': 'W', 'sub_type': 'style'}`
|
||||
`'I'` - `{'type': 'I'}`
|
||||
|
||||
For example, if you want to turn flake8 errors into warnings, you can do
|
||||
the following: >
|
||||
|
||||
let g:ale_type_map = {'flake8', {'ES': 'WS', 'E': 'W'}}
|
||||
<
|
||||
If you wanted to turn style errors and warnings into regular errors and
|
||||
warnings, you can use the following: >
|
||||
|
||||
let g:ale_type_map = {'flake8', {'ES': 'E', 'WS': 'W'}}
|
||||
<
|
||||
Type maps can be set per-buffer with `b:ale_type_map`.
|
||||
|
||||
|
||||
g:ale_warn_about_trailing_whitespace *g:ale_warn_about_trailing_whitespace*
|
||||
b:ale_warn_about_trailing_whitespace *b:ale_warn_about_trailing_whitespace*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user