mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
#977 Complain about the lack of configuration files for scalastyle in such a way that users will be directed towards getting it to work
This commit is contained in:
@@ -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\+\)$',
|
||||
|
||||
Reference in New Issue
Block a user