diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-12-18 23:36:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-18 23:36:13 +0000 |
commit | 91090f1af8f8f03efbcf37b8570d832ac69c6797 (patch) | |
tree | e38943ec759626e5fc22f9d1c0306696298fc298 | |
parent | 5577d567d13ab922ee1c97fc5d17d468f4c30876 (diff) | |
parent | 79aaec5a99c2fa4455758d4b0483b13fe4e0db78 (diff) | |
download | ale-91090f1af8f8f03efbcf37b8570d832ac69c6797.zip |
Merge pull request #1239 from languitar/vale-suggestion
Missing warning level 'suggestion' for vale
-rw-r--r-- | autoload/ale/handlers/vale.vim | 2 | ||||
-rw-r--r-- | test/handler/test_vale_handler.vader | 21 |
2 files changed, 23 insertions, 0 deletions
diff --git a/autoload/ale/handlers/vale.vim b/autoload/ale/handlers/vale.vim index c8420572..9dc0872f 100644 --- a/autoload/ale/handlers/vale.vim +++ b/autoload/ale/handlers/vale.vim @@ -4,6 +4,8 @@ function! ale#handlers#vale#GetType(severity) abort if a:severity is? 'warning' return 'W' + elseif a:severity is? 'suggestion' + return 'I' endif return 'E' diff --git a/test/handler/test_vale_handler.vader b/test/handler/test_vale_handler.vader index afc32db9..37badb47 100644 --- a/test/handler/test_vale_handler.vader +++ b/test/handler/test_vale_handler.vader @@ -32,6 +32,14 @@ Execute(The vale handler should handle a normal example): \ 'text': "'Documentation' is repeated!", \ 'code': 'vale.Repetition', \ }, + \ { + \ 'lnum': 7, + \ 'col': 1, + \ 'end_col': 27, + \ 'type': 'I', + \ 'text': "'Documentation' is repeated!", + \ 'code': 'vale.Repetition', + \ }, \ ], \ ale#handlers#vale#Handle(bufnr(''), [ \ '{', @@ -61,6 +69,19 @@ Execute(The vale handler should handle a normal example): \ ' 27', \ ' ],', \ ' "Hide": false', + \ ' },', + \ ' {', + \ ' "Check": "vale.Repetition",', + \ ' "Description": "",', + \ ' "Line": 7,', + \ ' "Link": "",', + \ " \"Message\": \"'Documentation' is repeated!\",", + \ ' "Severity": "suggestion",', + \ ' "Span": [', + \ ' 1,', + \ ' 27', + \ ' ],', + \ ' "Hide": false', \ ' }', \ ' ]', \ '}', |