diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-15 00:20:43 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-15 00:20:43 +0100 |
commit | 90d4fb139c1c6490c276d7c74b2616cb059e7d01 (patch) | |
tree | a3a2930b0fda640d4b760bdd5480e477a4c00b36 /ale_linters/scala/scalastyle.vim | |
parent | 515dcdef2941db96d4ca791395a55a0e94169e65 (diff) | |
download | ale-90d4fb139c1c6490c276d7c74b2616cb059e7d01.zip |
#977 Complain about the lack of configuration files for scalastyle in such a way that users will be directed towards getting it to work
Diffstat (limited to 'ale_linters/scala/scalastyle.vim')
-rw-r--r-- | ale_linters/scala/scalastyle.vim | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ale_linters/scala/scalastyle.vim b/ale_linters/scala/scalastyle.vim index ea56c0e4..f78fd749 100644 --- a/ale_linters/scala/scalastyle.vim +++ b/ale_linters/scala/scalastyle.vim @@ -8,10 +8,21 @@ let g:ale_scalastyle_config_loc = \ get(g:, 'ale_scalastyle_config_loc', '') function! ale_linters#scala#scalastyle#Handle(buffer, lines) abort + " Look for help output from scalastyle first, which indicates that no + " configuration file was found. + for l:line in a:lines[:10] + if l:line =~# '-c, --config' + return [{ + \ 'lnum': 1, + \ 'text': '(See :help ale-scala-scalastyle)' + \ . ' No scalastyle configuration file was found.', + \}] + endif + endfor + " Matches patterns like the following: " " warning file=/home/blurble/Doop.scala message=Missing or badly formed ScalaDoc: Extra @param foobles line=190 - let l:patterns = [ \ '^\(.\+\) .\+ message=\(.\+\) line=\(\d\+\)$', \ '^\(.\+\) .\+ message=\(.\+\) line=\(\d\+\) column=\(\d\+\)$', |