Browse Source

Updated plugins

pull/468/head
Amir Salihefendic 4 years ago
parent
commit
a6b64938eb
  1. 2
      sources_non_forked/ale/ale_linters/apiblueprint/drafter.vim
  2. 1
      sources_non_forked/ale/ale_linters/c/clangd.vim
  3. 2
      sources_non_forked/ale/ale_linters/clojure/joker.vim
  4. 1
      sources_non_forked/ale/ale_linters/cpp/clangd.vim
  5. 1
      sources_non_forked/ale/ale_linters/cucumber/cucumber.vim
  6. 2
      sources_non_forked/ale/ale_linters/cuda/nvcc.vim
  7. 1
      sources_non_forked/ale/ale_linters/dafny/dafny.vim
  8. 2
      sources_non_forked/ale/ale_linters/dart/language_server.vim
  9. 2
      sources_non_forked/ale/ale_linters/dockerfile/hadolint.vim
  10. 3
      sources_non_forked/ale/ale_linters/elixir/mix.vim
  11. 6
      sources_non_forked/ale/ale_linters/gitcommit/gitlint.vim
  12. 6
      sources_non_forked/ale/ale_linters/go/gobuild.vim
  13. 56
      sources_non_forked/ale/ale_linters/go/golangci_lint.vim
  14. 8
      sources_non_forked/ale/ale_linters/go/govet.vim
  15. 28
      sources_non_forked/ale/ale_linters/go/langserver.vim
  16. 2
      sources_non_forked/ale/ale_linters/html/tidy.vim
  17. 3
      sources_non_forked/ale/ale_linters/idris/idris.vim
  18. 2
      sources_non_forked/ale/ale_linters/java/javac.vim
  19. 23
      sources_non_forked/ale/ale_linters/java/javalsp.vim
  20. 3
      sources_non_forked/ale/ale_linters/javascript/flow.vim
  21. 1
      sources_non_forked/ale/ale_linters/json/jsonlint.vim
  22. 21
      sources_non_forked/ale/ale_linters/julia/languageserver.vim
  23. 7
      sources_non_forked/ale/ale_linters/kotlin/kotlinc.vim
  24. 1
      sources_non_forked/ale/ale_linters/make/checkmake.vim
  25. 2
      sources_non_forked/ale/ale_linters/markdown/remark_lint.vim
  26. 2
      sources_non_forked/ale/ale_linters/nasm/nasm.vim
  27. 1
      sources_non_forked/ale/ale_linters/objc/clangd.vim
  28. 1
      sources_non_forked/ale/ale_linters/objcpp/clangd.vim
  29. 5
      sources_non_forked/ale/ale_linters/perl/perl.vim
  30. 2
      sources_non_forked/ale/ale_linters/puppet/languageserver.vim
  31. 14
      sources_non_forked/ale/ale_linters/puppet/puppet.vim
  32. 6
      sources_non_forked/ale/ale_linters/python/flake8.vim
  33. 6
      sources_non_forked/ale/ale_linters/python/mypy.vim
  34. 7
      sources_non_forked/ale/ale_linters/python/prospector.vim
  35. 6
      sources_non_forked/ale/ale_linters/python/pycodestyle.vim
  36. 6
      sources_non_forked/ale/ale_linters/python/pyflakes.vim
  37. 6
      sources_non_forked/ale/ale_linters/python/pylint.vim
  38. 6
      sources_non_forked/ale/ale_linters/python/pyls.vim
  39. 6
      sources_non_forked/ale/ale_linters/python/pyre.vim
  40. 1
      sources_non_forked/ale/ale_linters/rst/rstcheck.vim
  41. 12
      sources_non_forked/ale/ale_linters/ruby/brakeman.vim
  42. 14
      sources_non_forked/ale/ale_linters/ruby/rails_best_practices.vim
  43. 13
      sources_non_forked/ale/ale_linters/ruby/reek.vim
  44. 12
      sources_non_forked/ale/ale_linters/ruby/rubocop.vim
  45. 20
      sources_non_forked/ale/ale_linters/ruby/solargraph.vim
  46. 2
      sources_non_forked/ale/ale_linters/rust/cargo.vim
  47. 31
      sources_non_forked/ale/ale_linters/scala/sbtserver.vim
  48. 2
      sources_non_forked/ale/ale_linters/scala/scalastyle.vim
  49. 1
      sources_non_forked/ale/ale_linters/sml/smlnj_cm.vim
  50. 1
      sources_non_forked/ale/ale_linters/solidity/solhint.vim
  51. 1
      sources_non_forked/ale/ale_linters/tcl/nagelfar.vim
  52. 1
      sources_non_forked/ale/ale_linters/terraform/tflint.vim
  53. 1
      sources_non_forked/ale/ale_linters/tex/lacheck.vim
  54. 5
      sources_non_forked/ale/ale_linters/thrift/thrift.vim
  55. 28
      sources_non_forked/ale/ale_linters/vim/ale_custom_linting_rules.vim
  56. 4
      sources_non_forked/ale/ale_linters/xml/xmllint.vim
  57. 1
      sources_non_forked/ale/ale_linters/yang/yang_lsp.vim
  58. 7
      sources_non_forked/ale/autoload/ale.vim
  59. 13
      sources_non_forked/ale/autoload/ale/assert.vim
  60. 3
      sources_non_forked/ale/autoload/ale/c.vim
  61. 23
      sources_non_forked/ale/autoload/ale/completion.vim
  62. 83
      sources_non_forked/ale/autoload/ale/cursor.vim
  63. 2
      sources_non_forked/ale/autoload/ale/definition.vim
  64. 20
      sources_non_forked/ale/autoload/ale/engine.vim
  65. 6
      sources_non_forked/ale/autoload/ale/events.vim
  66. 10
      sources_non_forked/ale/autoload/ale/fix.vim
  67. 25
      sources_non_forked/ale/autoload/ale/fix/registry.vim
  68. 2
      sources_non_forked/ale/autoload/ale/fixers/eslint.vim
  69. 1
      sources_non_forked/ale/autoload/ale/fixers/fixjson.vim
  70. 10
      sources_non_forked/ale/autoload/ale/fixers/gomod.vim
  71. 1
      sources_non_forked/ale/autoload/ale/fixers/importjs.vim
  72. 18
      sources_non_forked/ale/autoload/ale/fixers/ocamlformat.vim
  73. 1
      sources_non_forked/ale/autoload/ale/fixers/php_cs_fixer.vim
  74. 1
      sources_non_forked/ale/autoload/ale/fixers/phpcbf.vim
  75. 1
      sources_non_forked/ale/autoload/ale/fixers/puppetlint.vim
  76. 11
      sources_non_forked/ale/autoload/ale/fixers/rubocop.vim
  77. 1
      sources_non_forked/ale/autoload/ale/fixers/scalafmt.vim
  78. 18
      sources_non_forked/ale/autoload/ale/fixers/shfmt.vim
  79. 13
      sources_non_forked/ale/autoload/ale/fixers/sqlfmt.vim
  80. 16
      sources_non_forked/ale/autoload/ale/fixers/uncrustify.vim
  81. 29
      sources_non_forked/ale/autoload/ale/fixers/xmllint.vim
  82. 27
      sources_non_forked/ale/autoload/ale/go.vim
  83. 7
      sources_non_forked/ale/autoload/ale/handlers/eslint.vim
  84. 2
      sources_non_forked/ale/autoload/ale/handlers/gawk.vim
  85. 1
      sources_non_forked/ale/autoload/ale/handlers/go.vim
  86. 1
      sources_non_forked/ale/autoload/ale/handlers/ols.vim
  87. 1
      sources_non_forked/ale/autoload/ale/handlers/pony.vim
  88. 11
      sources_non_forked/ale/autoload/ale/handlers/redpen.vim
  89. 6
      sources_non_forked/ale/autoload/ale/handlers/rubocop.vim
  90. 9
      sources_non_forked/ale/autoload/ale/handlers/ruby.vim
  91. 5
      sources_non_forked/ale/autoload/ale/handlers/sml.vim
  92. 1
      sources_non_forked/ale/autoload/ale/handlers/vale.vim
  93. 20
      sources_non_forked/ale/autoload/ale/java.vim
  94. 7
      sources_non_forked/ale/autoload/ale/job.vim
  95. 19
      sources_non_forked/ale/autoload/ale/julia.vim
  96. 2
      sources_non_forked/ale/autoload/ale/linter.vim
  97. 3
      sources_non_forked/ale/autoload/ale/list.vim
  98. 2
      sources_non_forked/ale/autoload/ale/lsp.vim
  99. 16
      sources_non_forked/ale/autoload/ale/lsp_linter.vim
  100. 2
      sources_non_forked/ale/autoload/ale/preview.vim
  101. Some files were not shown because too many files have changed in this diff Show More

2
sources_non_forked/ale/ale_linters/apiblueprint/drafter.vim

@ -16,10 +16,12 @@ function! ale_linters#apiblueprint#drafter#HandleErrors(buffer, lines) abort @@ -16,10 +16,12 @@ function! ale_linters#apiblueprint#drafter#HandleErrors(buffer, lines) abort
\ 'lnum': l:match[3] + 0,
\ 'col': l:match[4] + 0,
\}
if l:match[5] isnot# ''
let l:item.end_lnum = l:match[6] + 0
let l:item.end_col = l:match[7] + 0
endif
call add(l:output, l:item)
endfor

1
sources_non_forked/ale/ale_linters/c/clangd.vim

@ -6,6 +6,7 @@ call ale#Set('c_clangd_options', '') @@ -6,6 +6,7 @@ call ale#Set('c_clangd_options', '')
function! ale_linters#c#clangd#GetProjectRoot(buffer) abort
let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction

2
sources_non_forked/ale/ale_linters/clojure/joker.vim

@ -9,9 +9,11 @@ function! ale_linters#clojure#joker#HandleJokerFormat(buffer, lines) abort @@ -9,9 +9,11 @@ function! ale_linters#clojure#joker#HandleJokerFormat(buffer, lines) abort
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:type = 'E'
if l:match[4] is? 'Parse warning'
let l:type = 'W'
endif
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,

1
sources_non_forked/ale/ale_linters/cpp/clangd.vim

@ -6,6 +6,7 @@ call ale#Set('cpp_clangd_options', '') @@ -6,6 +6,7 @@ call ale#Set('cpp_clangd_options', '')
function! ale_linters#cpp#clangd#GetProjectRoot(buffer) abort
let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction

1
sources_non_forked/ale/ale_linters/cucumber/cucumber.vim

@ -22,6 +22,7 @@ function! ale_linters#cucumber#cucumber#Handle(buffer, lines) abort @@ -22,6 +22,7 @@ function! ale_linters#cucumber#cucumber#Handle(buffer, lines) abort
endtry
let l:output = []
for l:element in get(l:json, 'elements', [])
for l:step in l:element['steps']
if l:step['result']['status'] is# 'undefined'

2
sources_non_forked/ale/ale_linters/cuda/nvcc.vim

@ -8,7 +8,6 @@ function! ale_linters#cuda#nvcc#GetCommand(buffer) abort @@ -8,7 +8,6 @@ function! ale_linters#cuda#nvcc#GetCommand(buffer) abort
" Unused: use ale#util#nul_file
" let l:output_file = ale#util#Tempname() . '.ii'
" call ale#engine#ManageFile(a:buffer, l:output_file)
return '%e -cuda'
\ . ale#Pad(ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer)))
\ . ale#Pad(ale#Var(a:buffer, 'cuda_nvcc_options'))
@ -23,7 +22,6 @@ function! ale_linters#cuda#nvcc#HandleNVCCFormat(buffer, lines) abort @@ -23,7 +22,6 @@ function! ale_linters#cuda#nvcc#HandleNVCCFormat(buffer, lines) abort
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:item = {
\ 'lnum': str2nr(l:match[2]),
\ 'type': l:match[4] =~# 'error' ? 'E' : 'W',

1
sources_non_forked/ale/ale_linters/dafny/dafny.vim

@ -13,6 +13,7 @@ function! ale_linters#dafny#dafny#Handle(buffer, lines) abort @@ -13,6 +13,7 @@ function! ale_linters#dafny#dafny#Handle(buffer, lines) abort
\ 'type': l:match[4] =~# '^Error' ? 'E' : 'W'
\ })
endfor
return l:output
endfunction

2
sources_non_forked/ale/ale_linters/dart/language_server.vim

@ -15,6 +15,6 @@ call ale#linter#Define('dart', { @@ -15,6 +15,6 @@ call ale#linter#Define('dart', {
\ 'name': 'language_server',
\ 'lsp': 'stdio',
\ 'executable_callback': ale#VarFunc('dart_language_server_executable'),
\ 'command_callback': 'ale_linters#dart#language_server#GetExecutable',
\ 'command': '%e',
\ 'project_root_callback': 'ale_linters#dart#language_server#GetProjectRoot',
\})

2
sources_non_forked/ale/ale_linters/dockerfile/hadolint.vim

@ -82,9 +82,11 @@ endfunction @@ -82,9 +82,11 @@ endfunction
function! ale_linters#dockerfile#hadolint#GetCommand(buffer) abort
let l:command = ale_linters#dockerfile#hadolint#GetExecutable(a:buffer)
if l:command is# 'docker'
return 'docker run --rm -i ' . ale#Var(a:buffer, 'dockerfile_hadolint_docker_image')
endif
return 'hadolint -'
endfunction

3
sources_non_forked/ale/ale_linters/elixir/mix.vim

@ -10,7 +10,6 @@ function! ale_linters#elixir#mix#Handle(buffer, lines) abort @@ -10,7 +10,6 @@ function! ale_linters#elixir#mix#Handle(buffer, lines) abort
"
" TODO: Warning format
" warning: variable "foobar" does not exist and is being expanded to "foobar()", please use parentheses to remove the ambiguity or change the variable name
let l:pattern = '\v\(([^\)]+Error)\) ([^:]+):([^:]+): (.+)$'
let l:output = []
@ -32,9 +31,11 @@ endfunction @@ -32,9 +31,11 @@ endfunction
function! ale_linters#elixir#mix#FindProjectRoot(buffer) abort
let l:mix_file = ale#path#FindNearestFile(a:buffer, 'mix.exs')
if !empty(l:mix_file)
return fnamemodify(l:mix_file, ':p:h')
endif
return '.'
endfunction

6
sources_non_forked/ale/ale_linters/gitcommit/gitlint.vim

@ -23,8 +23,10 @@ function! ale_linters#gitcommit#gitlint#Handle(buffer, lines) abort @@ -23,8 +23,10 @@ function! ale_linters#gitcommit#gitlint#Handle(buffer, lines) abort
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[2]
if l:code is# 'T2' && !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
continue
if !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
if l:code is# 'T2' || l:code is# 'B2'
continue
endif
endif
let l:item = {

6
sources_non_forked/ale/ale_linters/go/gobuild.vim

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
" Description: go build for Go files
" inspired by work from dzhou121 <dzhou121@gmail.com>
call ale#Set('go_go_executable', 'go')
call ale#Set('go_gobuild_options', '')
function! ale_linters#go#gobuild#GetCommand(buffer) abort
@ -10,7 +11,7 @@ function! ale_linters#go#gobuild#GetCommand(buffer) abort @@ -10,7 +11,7 @@ function! ale_linters#go#gobuild#GetCommand(buffer) abort
" Run go test in local directory with relative path
return ale#path#BufferCdString(a:buffer)
\ . 'go test'
\ . ale#Var(a:buffer, 'go_go_executable') . ' test'
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' -c -o /dev/null ./'
endfunction
@ -21,7 +22,6 @@ function! ale_linters#go#gobuild#GetMatches(lines) abort @@ -21,7 +22,6 @@ function! ale_linters#go#gobuild#GetMatches(lines) abort
" file.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args
" file.go:53:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
" file.go:5:2: expected declaration, found 'STRING' "log"
" go test returns relative paths so use tail of filename as part of pattern matcher
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:? (.+)$'
@ -48,7 +48,7 @@ endfunction @@ -48,7 +48,7 @@ endfunction
call ale#linter#Define('go', {
\ 'name': 'gobuild',
\ 'aliases': ['go build'],
\ 'executable': 'go',
\ 'executable_callback': ale#VarFunc('go_go_executable'),
\ 'command_callback': 'ale_linters#go#gobuild#GetCommand',
\ 'output_stream': 'stderr',
\ 'callback': 'ale_linters#go#gobuild#Handler',

56
sources_non_forked/ale/ale_linters/go/golangci_lint.vim

@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
" Author: Sascha Grunert <mail@saschagrunert.de>
" Description: Adds support of golangci-lint
call ale#Set('go_golangci_lint_options', '--enable-all')
call ale#Set('go_golangci_lint_executable', 'golangci-lint')
call ale#Set('go_golangci_lint_package', 0)
function! ale_linters#go#golangci_lint#GetCommand(buffer) abort
let l:filename = expand('#' . a:buffer . ':t')
let l:options = ale#Var(a:buffer, 'go_golangci_lint_options')
let l:lint_package = ale#Var(a:buffer, 'go_golangci_lint_package')
if l:lint_package
return ale#path#BufferCdString(a:buffer)
\ . '%e run '
\ . l:options
endif
return ale#path#BufferCdString(a:buffer)
\ . '%e run '
\ . ale#Escape(l:filename)
\ . ' ' . l:options
endfunction
function! ale_linters#go#golangci_lint#GetMatches(lines) abort
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:?:?:?\s\*?(.+)$'
return ale#util#GetMatches(a:lines, l:pattern)
endfunction
function! ale_linters#go#golangci_lint#Handler(buffer, lines) abort
let l:dir = expand('#' . a:buffer . ':p:h')
let l:output = []
for l:match in ale_linters#go#golangci_lint#GetMatches(a:lines)
" l:match[1] will already be an absolute path, output from
" golangci_lint
call add(l:output, {
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'type': 'E',
\ 'text': l:match[4],
\})
endfor
return l:output
endfunction
call ale#linter#Define('go', {
\ 'name': 'golangci-lint',
\ 'executable_callback': ale#VarFunc('go_golangci_lint_executable'),
\ 'command_callback': 'ale_linters#go#golangci_lint#GetCommand',
\ 'callback': 'ale_linters#go#golangci_lint#Handler',
\ 'lint_file': 1,
\})

8
sources_non_forked/ale/ale_linters/go/govet.vim

@ -4,19 +4,23 @@ @@ -4,19 +4,23 @@
" Author: John Eikenberry <jae@zhar.net>
" Description: updated to work with go1.10
call ale#Set('go_go_executable', 'go')
call ale#Set('go_govet_options', '')
function! ale_linters#go#govet#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'go_govet_options')
return ale#path#BufferCdString(a:buffer) . ' go vet .'
return ale#path#BufferCdString(a:buffer) . ' '
\ . ale#Var(a:buffer, 'go_go_executable') . ' vet '
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' .'
endfunction
call ale#linter#Define('go', {
\ 'name': 'govet',
\ 'aliases': ['go vet'],
\ 'output_stream': 'stderr',
\ 'executable': 'go',
\ 'executable_callback': ale#VarFunc('go_go_executable'),
\ 'command_callback': 'ale_linters#go#govet#GetCommand',
\ 'callback': 'ale#handlers#go#Handler',
\ 'lint_file': 1,

28
sources_non_forked/ale/ale_linters/go/langserver.vim

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
" Author: Horacio Sanson <https://github.com/hsanson>
" Description: Support for go-langserver https://github.com/sourcegraph/go-langserver
call ale#Set('go_langserver_executable', 'go-langserver')
call ale#Set('go_langserver_options', '')
function! ale_linters#go#langserver#GetCommand(buffer) abort
let l:executable = [ale#Escape(ale#Var(a:buffer, 'go_langserver_executable'))]
let l:options = ale#Var(a:buffer, 'go_langserver_options')
let l:options = substitute(l:options, '-gocodecompletion', '', 'g')
let l:options = filter(split(l:options, ' '), 'empty(v:val) != 1')
if(ale#Var(a:buffer, 'completion_enabled') == 1)
call add(l:options, '-gocodecompletion')
endif
let l:options = uniq(sort(l:options))
return join(extend(l:executable, l:options), ' ')
endfunction
call ale#linter#Define('go', {
\ 'name': 'golangserver',
\ 'lsp': 'stdio',
\ 'executable_callback': ale#VarFunc('go_langserver_executable'),
\ 'command_callback': 'ale_linters#go#langserver#GetCommand',
\ 'project_root_callback': 'ale#go#FindProjectRoot',
\})

2
sources_non_forked/ale/ale_linters/html/tidy.vim

@ -25,6 +25,7 @@ function! ale_linters#html#tidy#GetCommand(buffer) abort @@ -25,6 +25,7 @@ function! ale_linters#html#tidy#GetCommand(buffer) abort
" On macOS, old tidy (released on 31 Oct 2006) is installed. It does not
" consider HTML5 so we should avoid it.
let l:executable = ale#Var(a:buffer, 'html_tidy_executable')
if has('mac') && l:executable is# 'tidy' && exists('*exepath')
\ && exepath(l:executable) is# '/usr/bin/tidy'
return ''
@ -40,7 +41,6 @@ endfunction @@ -40,7 +41,6 @@ endfunction
function! ale_linters#html#tidy#Handle(buffer, lines) abort
" Matches patterns lines like the following:
" line 7 column 5 - Warning: missing </title> before </head>
let l:pattern = '^line \(\d\+\) column \(\d\+\) - \(Warning\|Error\): \(.\+\)$'
let l:output = []

3
sources_non_forked/ale/ale_linters/idris/idris.vim

@ -12,7 +12,7 @@ endfunction @@ -12,7 +12,7 @@ endfunction
function! ale_linters#idris#idris#Handle(buffer, lines) abort
" This was copied almost verbatim from ale#handlers#haskell#HandleGHCFormat
"
" Look for lines like the following:
" foo.idr:2:6:When checking right hand side of main with expected type
" bar.idr:11:11-13:
@ -30,6 +30,7 @@ function! ale_linters#idris#idris#Handle(buffer, lines) abort @@ -30,6 +30,7 @@ function! ale_linters#idris#idris#Handle(buffer, lines) abort
else
let l:corrected_lines[-1] .= l:line
endif
let l:corrected_lines[-1] = substitute(l:corrected_lines[-1], '\s\+', ' ', 'g')
endif
endfor

2
sources_non_forked/ale/ale_linters/java/javac.vim

@ -16,6 +16,7 @@ function! ale_linters#java#javac#GetImportPaths(buffer) abort @@ -16,6 +16,7 @@ function! ale_linters#java#javac#GetImportPaths(buffer) abort
endif
let l:classpath_command = ale#gradle#BuildClasspathCommand(a:buffer)
if !empty(l:classpath_command)
return l:classpath_command
endif
@ -90,7 +91,6 @@ function! ale_linters#java#javac#Handle(buffer, lines) abort @@ -90,7 +91,6 @@ function! ale_linters#java#javac#Handle(buffer, lines) abort
"
" Main.java:13: warning: [deprecation] donaught() in Testclass has been deprecated
" Main.java:16: error: ';' expected
let l:directory = expand('#' . a:buffer . ':p:h')
let l:pattern = '\v^(.*):(\d+): (.+):(.+)$'
let l:col_pattern = '\v^(\s*\^)$'

23
sources_non_forked/ale/ale_linters/java/javalsp.vim

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
" Author: Horacio Sanson <https://github.com/hsanson>
" Description: Support for the Java language server https://github.com/georgewfraser/vscode-javac
call ale#Set('java_javalsp_jar', 'javacs.jar')
function! ale_linters#java#javalsp#Executable(buffer) abort
return 'java'
endfunction
function! ale_linters#java#javalsp#Command(buffer) abort
let l:jar = ale#Var(a:buffer, 'java_javalsp_jar')
return ale#Escape('java -cp ' . l:jar . ' -Xverify:none org.javacs.Main')
endfunction
call ale#linter#Define('java', {
\ 'name': 'javalsp',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#java#javalsp#Executable',
\ 'command_callback': 'ale_linters#java#javalsp#Command',
\ 'language': 'java',
\ 'project_root_callback': 'ale#java#FindProjectRoot',
\})

3
sources_non_forked/ale/ale_linters/javascript/flow.vim

@ -91,7 +91,6 @@ function! s:GetDetails(error) abort @@ -91,7 +91,6 @@ function! s:GetDetails(error) abort
let l:detail = ''
for l:extra_error in a:error.extra
if has_key(l:extra_error, 'message')
for l:extra_message in l:extra_error.message
let l:detail = s:ExtraErrorMsg(l:detail, l:extra_message.descr)
@ -105,7 +104,6 @@ function! s:GetDetails(error) abort @@ -105,7 +104,6 @@ function! s:GetDetails(error) abort
endfor
endfor
endif
endfor
return l:detail
@ -161,7 +159,6 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort @@ -161,7 +159,6 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
endif
call add(l:output, l:errorToAdd)
endfor
return l:output

1
sources_non_forked/ale/ale_linters/json/jsonlint.vim

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
function! ale_linters#json#jsonlint#Handle(buffer, lines) abort
" Matches patterns like the following:
" line 2, col 15, found: 'STRING' - expected: 'EOF', '}', ',', ']'.
let l:pattern = '^line \(\d\+\), col \(\d*\), \(.\+\)$'
let l:output = []

21
sources_non_forked/ale/ale_linters/julia/languageserver.vim

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
" Author: Bartolomeo Stellato <bartolomeo.stellato@gmail.com>
" Description: A language server for Julia
" Set julia executable variable
call ale#Set('julia_executable', 'julia')
function! ale_linters#julia#languageserver#GetCommand(buffer) abort
let l:julia_executable = ale#Var(a:buffer, 'julia_executable')
let l:cmd_string = 'using LanguageServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, false); server.runlinter = true; run(server);'
return ale#Escape(l:julia_executable) . ' --startup-file=no --history-file=no -e ' . ale#Escape(l:cmd_string)
endfunction
call ale#linter#Define('julia', {
\ 'name': 'languageserver',
\ 'lsp': 'stdio',
\ 'executable_callback': ale#VarFunc('julia_executable'),
\ 'command_callback': 'ale_linters#julia#languageserver#GetCommand',
\ 'language': 'julia',
\ 'project_root_callback': 'ale#julia#FindProjectRoot',
\})

7
sources_non_forked/ale/ale_linters/kotlin/kotlinc.vim

@ -17,12 +17,14 @@ function! ale_linters#kotlin#kotlinc#GetImportPaths(buffer) abort @@ -17,12 +17,14 @@ function! ale_linters#kotlin#kotlinc#GetImportPaths(buffer) abort
return ''
else
let l:pom_path = ale#path#FindNearestFile(a:buffer, 'pom.xml')
if !empty(l:pom_path) && executable('mvn')
return ale#path#CdString(fnamemodify(l:pom_path, ':h'))
\ . 'mvn dependency:build-classpath'
endif
let l:classpath_command = ale#gradle#BuildClasspathCommand(a:buffer)
if !empty(l:classpath_command)
return l:classpath_command
endif
@ -78,12 +80,13 @@ function! ale_linters#kotlin#kotlinc#GetCommand(buffer, import_paths) abort @@ -78,12 +80,13 @@ function! ale_linters#kotlin#kotlinc#GetCommand(buffer, import_paths) abort
endif
let l:fname = ''
if ale#Var(a:buffer, 'kotlin_kotlinc_sourcepath') isnot# ''
let l:fname .= expand(ale#Var(a:buffer, 'kotlin_kotlinc_sourcepath'), 1) . ' '
else
" Find the src directory for files in this project.
let l:project_root = ale#gradle#FindProjectRoot(a:buffer)
if !empty(l:project_root)
let l:src_dir = l:project_root
else
@ -93,6 +96,7 @@ function! ale_linters#kotlin#kotlinc#GetCommand(buffer, import_paths) abort @@ -93,6 +96,7 @@ function! ale_linters#kotlin#kotlinc#GetCommand(buffer, import_paths) abort
let l:fname .= expand(l:src_dir, 1) . ' '
endif
let l:fname .= ale#Escape(expand('#' . a:buffer . ':p'))
let l:command .= l:kotlinc_opts . ' ' . l:fname
@ -124,6 +128,7 @@ function! ale_linters#kotlin#kotlinc#Handle(buffer, lines) abort @@ -124,6 +128,7 @@ function! ale_linters#kotlin#kotlinc#Handle(buffer, lines) abort
if l:buf_abspath isnot# l:curbuf_abspath
continue
endif
let l:type_marker_str = l:type is# 'warning' ? 'W' : 'E'
call add(l:output, {

1
sources_non_forked/ale/ale_linters/make/checkmake.vim

@ -13,6 +13,7 @@ function! ale_linters#make#checkmake#Handle(buffer, lines) abort @@ -13,6 +13,7 @@ function! ale_linters#make#checkmake#Handle(buffer, lines) abort
\ 'text': l:match[3],
\})
endfor
return l:output
endfunction

2
sources_non_forked/ale/ale_linters/markdown/remark_lint.vim

@ -24,10 +24,12 @@ function! ale_linters#markdown#remark_lint#Handle(buffer, lines) abort @@ -24,10 +24,12 @@ function! ale_linters#markdown#remark_lint#Handle(buffer, lines) abort
\ 'type': l:match[6] is# 'error' ? 'E' : 'W',
\ 'text': l:match[7],
\}
if l:match[3] isnot# ''
let l:item.end_lnum = l:match[4] + 0
let l:item.end_col = l:match[5] + 0
endif
call add(l:output, l:item)
endfor

2
sources_non_forked/ale/ale_linters/nasm/nasm.vim

@ -8,10 +8,12 @@ function! ale_linters#nasm#nasm#GetCommand(buffer) abort @@ -8,10 +8,12 @@ function! ale_linters#nasm#nasm#GetCommand(buffer) abort
" Note that NASM requires a trailing slash for the -I option.
let l:separator = has('win32') ? '\' : '/'
let l:path = fnamemodify(bufname(a:buffer), ':p:h') . l:separator
let l:output_null = has('win32') ? 'NUL' : '/dev/null'
return '%e -X gnu -I ' . ale#Escape(l:path)
\ . ale#Pad(ale#Var(a:buffer, 'nasm_nasm_options'))
\ . ' %s'
\ . ' -o ' . l:output_null
endfunction
function! ale_linters#nasm#nasm#Handle(buffer, lines) abort

1
sources_non_forked/ale/ale_linters/objc/clangd.vim

@ -6,6 +6,7 @@ call ale#Set('objc_clangd_options', '') @@ -6,6 +6,7 @@ call ale#Set('objc_clangd_options', '')
function! ale_linters#objc#clangd#GetProjectRoot(buffer) abort
let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction

1
sources_non_forked/ale/ale_linters/objcpp/clangd.vim

@ -6,6 +6,7 @@ call ale#Set('objcpp_clangd_options', '') @@ -6,6 +6,7 @@ call ale#Set('objcpp_clangd_options', '')
function! ale_linters#objcpp#clangd#GetProjectRoot(buffer) abort
let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction

5
sources_non_forked/ale/ale_linters/perl/perl.vim

@ -14,11 +14,16 @@ let s:begin_failed_skip_pattern = '\v' . join([ @@ -14,11 +14,16 @@ let s:begin_failed_skip_pattern = '\v' . join([
\], '|')
function! ale_linters#perl#perl#Handle(buffer, lines) abort
if empty(a:lines)
return []
endif
let l:pattern = '\(.\+\) at \(.\+\) line \(\d\+\)'
let l:output = []
let l:basename = expand('#' . a:buffer . ':t')
let l:type = 'E'
if a:lines[-1] =~# 'syntax OK'
let l:type = 'W'
endif

2
sources_non_forked/ale/ale_linters/puppet/languageserver.vim

@ -8,6 +8,7 @@ function! ale_linters#puppet#languageserver#GetProjectRoot(buffer) abort @@ -8,6 +8,7 @@ function! ale_linters#puppet#languageserver#GetProjectRoot(buffer) abort
" there's no requirement to have it, so fall back to the other possible
" Puppet module directories
let l:root_path = ale#path#FindNearestFile(a:buffer, 'metadata.json')
if !empty(l:root_path)
return fnamemodify(l:root_path, ':h')
endif
@ -17,6 +18,7 @@ function! ale_linters#puppet#languageserver#GetProjectRoot(buffer) abort @@ -17,6 +18,7 @@ function! ale_linters#puppet#languageserver#GetProjectRoot(buffer) abort
\ 'templates',
\]
let l:root_path = ale#path#FindNearestDirectory(a:buffer, l:test_path)
if !empty(l:root_path)
return fnamemodify(l:root_path, ':h:h')
endif

14
sources_non_forked/ale/ale_linters/puppet/puppet.vim

@ -1,11 +1,13 @@ @@ -1,11 +1,13 @@
" Author: Alexander Olofsson <alexander.olofsson@liu.se>
call ale#Set('puppet_puppet_executable', 'puppet')
call ale#Set('puppet_puppet_options', '')
function! ale_linters#puppet#puppet#Handle(buffer, lines) abort
" Matches patterns like the following:
" Error: Could not parse for environment production: Syntax error at ':' at /root/puppetcode/modules/nginx/manifests/init.pp:43:12
" Error: Could not parse for environment production: Syntax error at '='; expected '}' at /root/puppetcode/modules/pancakes/manifests/init.pp:5"
" Error: Could not parse for environment production: Syntax error at 'parameter1' (file: /tmp/modules/mariadb/manifests/slave.pp, line: 4, column: 5)
let l:pattern = '^Error: .*: \(.\+\) \((file:\|at\) .\+\.pp\(, line: \|:\)\(\d\+\)\(, column: \|:\)\=\(\d*\)'
let l:output = []
@ -20,10 +22,16 @@ function! ale_linters#puppet#puppet#Handle(buffer, lines) abort @@ -20,10 +22,16 @@ function! ale_linters#puppet#puppet#Handle(buffer, lines) abort
return l:output
endfunction
function! ale_linters#puppet#puppet#GetCommand(buffer) abort
return '%e parser validate --color=false '
\ . ale#Pad(ale#Var(a:buffer, 'puppet_puppet_options'))
\ . ' %t'
endfunction
call ale#linter#Define('puppet', {
\ 'name': 'puppet',
\ 'executable': 'puppet',
\ 'executable_callback': ale#VarFunc('puppet_puppet_executable'),
\ 'output_stream': 'stderr',
\ 'command': 'puppet parser validate --color=false %t',
\ 'command_callback': 'ale_linters#puppet#puppet#GetCommand',
\ 'callback': 'ale_linters#puppet#puppet#Handle',
\})

6
sources_non_forked/ale/ale_linters/python/flake8.vim

@ -5,12 +5,18 @@ call ale#Set('python_flake8_executable', 'flake8') @@ -5,12 +5,18 @@ call ale#Set('python_flake8_executable', 'flake8')
call ale#Set('python_flake8_options', '')
call ale#Set('python_flake8_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_flake8_change_directory', 1)
call ale#Set('python_flake8_auto_pipenv', 0)
function! s:UsingModule(buffer) abort
return ale#Var(a:buffer, 'python_flake8_options') =~# ' *-m flake8'
endfunction
function! ale_linters#python#flake8#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_flake8_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
if !s:UsingModule(a:buffer)
return ale#python#FindExecutable(a:buffer, 'python_flake8', ['flake8'])
endif

6
sources_non_forked/ale/ale_linters/python/mypy.vim

@ -5,8 +5,14 @@ call ale#Set('python_mypy_executable', 'mypy') @@ -5,8 +5,14 @@ call ale#Set('python_mypy_executable', 'mypy')
call ale#Set('python_mypy_ignore_invalid_syntax', 0)
call ale#Set('python_mypy_options', '')
call ale#Set('python_mypy_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_mypy_auto_pipenv', 0)
function! ale_linters#python#mypy#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_mypy_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_mypy', ['mypy'])
endfunction

7
sources_non_forked/ale/ale_linters/python/prospector.vim

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
" Author: chocoelho <carlospecter@gmail.com>
" Description: prospector linter python files
call ale#Set('python_prospector_auto_pipenv', 0)
let g:ale_python_prospector_executable =
\ get(g:, 'ale_python_prospector_executable', 'prospector')
@ -10,6 +12,11 @@ let g:ale_python_prospector_options = @@ -10,6 +12,11 @@ let g:ale_python_prospector_options =
let g:ale_python_prospector_use_global = get(g:, 'ale_python_prospector_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale_linters#python#prospector#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_prospector_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_prospector', ['prospector'])
endfunction

6
sources_non_forked/ale/ale_linters/python/pycodestyle.vim

@ -4,8 +4,14 @@ @@ -4,8 +4,14 @@
call ale#Set('python_pycodestyle_executable', 'pycodestyle')
call ale#Set('python_pycodestyle_options', '')
call ale#Set('python_pycodestyle_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pycodestyle_auto_pipenv', 0)
function! ale_linters#python#pycodestyle#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pycodestyle_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_pycodestyle', ['pycodestyle'])
endfunction

6
sources_non_forked/ale/ale_linters/python/pyflakes.vim

@ -3,8 +3,14 @@ @@ -3,8 +3,14 @@
call ale#Set('python_pyflakes_executable', 'pyflakes')
call ale#Set('python_pyflakes_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pyflakes_auto_pipenv', 0)
function! ale_linters#python#pyflakes#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyflakes_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_pyflakes', ['pyflakes'])
endfunction

6
sources_non_forked/ale/ale_linters/python/pylint.vim

@ -5,8 +5,14 @@ call ale#Set('python_pylint_executable', 'pylint') @@ -5,8 +5,14 @@ call ale#Set('python_pylint_executable', 'pylint')
call ale#Set('python_pylint_options', '')
call ale#Set('python_pylint_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pylint_change_directory', 1)
call ale#Set('python_pylint_auto_pipenv', 0)
function! ale_linters#python#pylint#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pylint_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_pylint', ['pylint'])
endfunction

6
sources_non_forked/ale/ale_linters/python/pyls.vim

@ -3,8 +3,14 @@ @@ -3,8 +3,14 @@
call ale#Set('python_pyls_executable', 'pyls')
call ale#Set('python_pyls_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pyls_auto_pipenv', 0)
function! ale_linters#python#pyls#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyls_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_pyls', ['pyls'])
endfunction

6
sources_non_forked/ale/ale_linters/python/pyre.vim

@ -3,8 +3,14 @@ @@ -3,8 +3,14 @@
call ale#Set('python_pyre_executable', 'pyre')
call ale#Set('python_pyre_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pyre_auto_pipenv', 0)
function! ale_linters#python#pyre#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyre_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_pyre', ['pyre'])
endfunction

1
sources_non_forked/ale/ale_linters/rst/rstcheck.vim

@ -8,6 +8,7 @@ function! ale_linters#rst#rstcheck#Handle(buffer, lines) abort @@ -8,6 +8,7 @@ function! ale_linters#rst#rstcheck#Handle(buffer, lines) abort
let l:pattern = '\v^(.+):(\d*): \(([a-zA-Z]*)/\d*\) (.+)$'
let l:dir = expand('#' . a:buffer . ':p:h')
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),

12
sources_non_forked/ale/ale_linters/ruby/brakeman.vim

@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
" Author: Eddie Lebow https://github.com/elebow
" Description: Brakeman, a static analyzer for Rails security
let g:ale_ruby_brakeman_options =
\ get(g:, 'ale_ruby_brakeman_options', '')
call ale#Set('ruby_brakeman_options', '')
call ale#Set('ruby_brakeman_executable', 'brakeman')
call ale#Set('ruby_brakeman_options', '')
function! ale_linters#ruby#brakeman#Handle(buffer, lines) abort
let l:output = []
@ -33,14 +34,17 @@ function! ale_linters#ruby#brakeman#GetCommand(buffer) abort @@ -33,14 +34,17 @@ function! ale_linters#ruby#brakeman#GetCommand(buffer) abort
return ''
endif
return 'brakeman -f json -q '
let l:executable = ale#Var(a:buffer, 'ruby_brakeman_executable')
return ale#handlers#ruby#EscapeExecutable(l:executable, 'brakeman')
\ . ' -f json -q '
\ . ale#Var(a:buffer, 'ruby_brakeman_options')
\ . ' -p ' . ale#Escape(l:rails_root)
endfunction
call ale#linter#Define('ruby', {
\ 'name': 'brakeman',
\ 'executable': 'brakeman',
\ 'executable_callback': ale#VarFunc('ruby_brakeman_executable'),
\ 'command_callback': 'ale_linters#ruby#brakeman#GetCommand',
\ 'callback': 'ale_linters#ruby#brakeman#Handle',
\ 'lint_file': 1,

14
sources_non_forked/ale/ale_linters/ruby/rails_best_practices.vim

@ -22,26 +22,18 @@ function! ale_linters#ruby#rails_best_practices#Handle(buffer, lines) abort @@ -22,26 +22,18 @@ function! ale_linters#ruby#rails_best_practices#Handle(buffer, lines) abort
return l:output
endfunction
function! ale_linters#ruby#rails_best_practices#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'ruby_rails_best_practices_executable')
endfunction
function! ale_linters#ruby#rails_best_practices#GetCommand(buffer) abort
let l:executable = ale_linters#ruby#rails_best_practices#GetExecutable(a:buffer)
let l:exec_args = l:executable =~? 'bundle$'
\ ? ' exec rails_best_practices'
\ : ''
let l:rails_root = ale#ruby#FindRailsRoot(a:buffer)
if l:rails_root is? ''
return ''
endif
let l:executable = ale#Var(a:buffer, 'ruby_rails_best_practices_executable')
let l:output_file = ale#Has('win32') ? '%t ' : '/dev/stdout '
let l:cat_file = ale#Has('win32') ? '; type %t' : ''
return ale#Escape(l:executable) . l:exec_args
return ale#handlers#ruby#EscapeExecutable(l:executable, 'rails_best_practices')
\ . ' --silent -f json --output-file ' . l:output_file
\ . ale#Var(a:buffer, 'ruby_rails_best_practices_options')
\ . ale#Escape(l:rails_root)
@ -50,7 +42,7 @@ endfunction @@ -50,7 +42,7 @@ endfunction
call ale#linter#Define('ruby', {
\ 'name': 'rails_best_practices',
\ 'executable_callback': 'ale_linters#ruby#rails_best_practices#GetExecutable',
\ 'executable_callback': ale#VarFunc('ruby_rails_best_practices_executable'),
\ 'command_callback': 'ale_linters#ruby#rails_best_practices#GetCommand',
\ 'callback': 'ale_linters#ruby#rails_best_practices#Handle',
\ 'lint_file': 1,

13
sources_non_forked/ale/ale_linters/ruby/reek.vim

@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
call ale#Set('ruby_reek_show_context', 0)
call ale#Set('ruby_reek_show_wiki_link', 0)
call ale#Set('ruby_reek_options', '')
call ale#Set('ruby_reek_executable', 'reek')
function! ale_linters#ruby#reek#VersionCheck(buffer) abort
" If we have previously stored the version number in a cache, then
@ -12,18 +14,23 @@ function! ale_linters#ruby#reek#VersionCheck(buffer) abort @@ -12,18 +14,23 @@ function! ale_linters#ruby#reek#VersionCheck(buffer) abort
return ''
endif
return 'reek --version'
let l:executable = ale#Var(a:buffer, 'ruby_reek_executable')
return ale#handlers#ruby#EscapeExecutable(l:executable, 'reek')
\ . ' --version'
endfunction
function! ale_linters#ruby#reek#GetCommand(buffer, version_output) abort
let l:version = ale#semver#GetVersion('reek', a:version_output)
let l:executable = ale#Var(a:buffer, 'ruby_reek_executable')
" Tell reek what the filename is if the version of reek is new enough.
let l:display_name_args = ale#semver#GTE(l:version, [5, 0, 0])
\ ? ' --stdin-filename %s'
\ : ''
return 'reek -f json --no-progress --no-color'
return ale#handlers#ruby#EscapeExecutable(l:executable, 'reek')
\ . ' -f json --no-progress --no-color'
\ . l:display_name_args
endfunction
@ -62,7 +69,7 @@ endfunction @@ -62,7 +69,7 @@ endfunction
call ale#linter#Define('ruby', {
\ 'name': 'reek',
\ 'executable': 'reek',
\ 'executable_callback': ale#VarFunc('ruby_reek_executable'),
\ 'command_chain': [
\ {'callback': 'ale_linters#ruby#reek#VersionCheck'},
\ {'callback': 'ale_linters#ruby#reek#GetCommand'},

12
sources_non_forked/ale/ale_linters/ruby/rubocop.vim

@ -1,13 +1,13 @@ @@ -1,13 +1,13 @@
" Author: ynonp - https://github.com/ynonp, Eddie Lebow https://github.com/elebow
" Description: RuboCop, a code style analyzer for Ruby files
call ale#Set('ruby_rubocop_executable', 'rubocop')
call ale#Set('ruby_rubocop_options', '')
function! ale_linters#ruby#rubocop#GetCommand(buffer) abort
let l:executable = ale#handlers#rubocop#GetExecutable(a:buffer)
let l:exec_args = l:executable =~? 'bundle$'
\ ? ' exec rubocop'
\ : ''
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
return ale#Escape(l:executable) . l:exec_args
return ale#handlers#ruby#EscapeExecutable(l:executable, 'rubocop')
\ . ' --format json --force-exclusion '
\ . ale#Var(a:buffer, 'ruby_rubocop_options')
\ . ' --stdin ' . ale#Escape(expand('#' . a:buffer . ':p'))
@ -55,7 +55,7 @@ endfunction @@ -55,7 +55,7 @@ endfunction
call ale#linter#Define('ruby', {
\ 'name': 'rubocop',
\ 'executable_callback': 'ale#handlers#rubocop#GetExecutable',
\ 'executable_callback': ale#VarFunc('ruby_rubocop_executable'),
\ 'command_callback': 'ale_linters#ruby#rubocop#GetCommand',
\ 'callback': 'ale_linters#ruby#rubocop#Handle',
\})

20
sources_non_forked/ale/ale_linters/ruby/solargraph.vim

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
" Author: Horacio Sanson - https://github.com/hsanson
" Description: Solargraph Language Server https://solargraph.org/
"
" Author: Devon Meunier <devon.meunier@gmail.com>
" Description: updated to use stdio
call ale#Set('ruby_solargraph_executable', 'solargraph')
function! ale_linters#ruby#solargraph#GetCommand(buffer) abort
return '%e' . ale#Pad('stdio')
endfunction
call ale#linter#Define('ruby', {
\ 'name': 'solargraph',
\ 'lsp': 'stdio',
\ 'language': 'ruby',
\ 'executable_callback': ale#VarFunc('ruby_solargraph_executable'),
\ 'command_callback': 'ale_linters#ruby#solargraph#GetCommand',
\ 'project_root_callback': 'ale#ruby#FindProjectRoot',
\})

2
sources_non_forked/ale/ale_linters/rust/cargo.vim

@ -42,6 +42,7 @@ function! ale_linters#rust#cargo#GetCommand(buffer, version_output) abort @@ -42,6 +42,7 @@ function! ale_linters#rust#cargo#GetCommand(buffer, version_output) abort
\ && ale#semver#GTE(l:version, [0, 22, 0])
let l:include_features = ale#Var(a:buffer, 'rust_cargo_include_features')
if !empty(l:include_features)
let l:include_features = ' --features ' . ale#Escape(l:include_features)
endif
@ -59,6 +60,7 @@ function! ale_linters#rust#cargo#GetCommand(buffer, version_output) abort @@ -59,6 +60,7 @@ function! ale_linters#rust#cargo#GetCommand(buffer, version_output) abort
endif
let l:default_feature_behavior = ale#Var(a:buffer, 'rust_cargo_default_feature_behavior')
if l:default_feature_behavior is# 'all'
let l:include_features = ''
let l:default_feature = ' --all-features'

31
sources_non_forked/ale/ale_linters/scala/sbtserver.vim

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
" Author: ophirr33 <coghlan.ty@gmail.com>
" Description: TCP lsp client for sbt Server
call ale#Set('scala_sbtserver_address', '127.0.0.1:4273')
call ale#Set('scala_sbtserver_project_root', '')
function! ale_linters#scala#sbtserver#GetProjectRoot(buffer) abort
let l:project_root = ale#Var(a:buffer, 'scala_sbtserver_project_root')
if l:project_root is? ''
let l:project_root = ale#path#FindNearestFile(a:buffer, 'build.sbt')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endif
return l:project_root
endfunction
function! ale_linters#scala#sbtserver#GetAddress(buffer) abort
let l:address = ale#Var(a:buffer, 'scala_sbtserver_address')
return l:address
endfunction
call ale#linter#Define('scala', {
\ 'name': 'sbtserver',
\ 'lsp': 'socket',
\ 'address_callback': 'ale_linters#scala#sbtserver#GetAddress',
\ 'language': 'scala',
\ 'project_root_callback': 'ale_linters#scala#sbtserver#GetProjectRoot',
\})

2
sources_non_forked/ale/ale_linters/scala/scalastyle.vim

@ -53,12 +53,14 @@ function! ale_linters#scala#scalastyle#GetCommand(buffer) abort @@ -53,12 +53,14 @@ function! ale_linters#scala#scalastyle#GetCommand(buffer) abort
\ 'scalastyle_config.xml',
\ 'scalastyle-config.xml'
\]
for l:config in l:potential_configs
let l:scalastyle_config = ale#path#ResolveLocalPath(
\ a:buffer,
\ l:config,
\ ''
\)
if !empty(l:scalastyle_config)
break
endif

1
sources_non_forked/ale/ale_linters/sml/smlnj_cm.vim

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
function! ale_linters#sml#smlnj_cm#GetCommand(buffer) abort
let l:cmfile = ale#handlers#sml#GetCmFile(a:buffer)
return 'sml -m ' . l:cmfile . ' < /dev/null'
endfunction

1
sources_non_forked/ale/ale_linters/solidity/solhint.vim

@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
function! ale_linters#solidity#solhint#Handle(buffer, lines) abort
" Matches patterns like the following:
" /path/to/file/file.sol: line 1, col 10, Error - 'addOne' is defined but never used. (no-unused-vars)
let l:pattern = '\v^[^:]+: line (\d+), col (\d+), (Error|Warning) - (.*) \((.*)\)$'
let l:output = []

1
sources_non_forked/ale/ale_linters/tcl/nagelfar.vim

@ -15,7 +15,6 @@ function! ale_linters#tcl#nagelfar#Handle(buffer, lines) abort @@ -15,7 +15,6 @@ function! ale_linters#tcl#nagelfar#Handle(buffer, lines) abort
" Line 5: W Found constant "bepa" which is also a variable.
" Line 13: E Wrong number of arguments (3) to "set"
" Line 93: N Close brace not aligned with line 90 (4 0)
let l:pattern = '^Line\s\+\([0-9]\+\): \([NEW]\) \(.*\)$'
let l:output = []

1
sources_non_forked/ale/ale_linters/terraform/tflint.vim

@ -40,6 +40,7 @@ function! ale_linters#terraform#tflint#GetCommand(buffer) abort @@ -40,6 +40,7 @@ function! ale_linters#terraform#tflint#GetCommand(buffer) abort
endif
let l:opts = ale#Var(a:buffer, 'terraform_tflint_options')
if !empty(l:opts)
let l:cmd .= ' ' . l:opts
endif

1
sources_non_forked/ale/ale_linters/tex/lacheck.vim

@ -8,7 +8,6 @@ function! ale_linters#tex#lacheck#Handle(buffer, lines) abort @@ -8,7 +8,6 @@ function! ale_linters#tex#lacheck#Handle(buffer, lines) abort
"
" "book.tex", line 37: possible unwanted space at "{"
" "book.tex", line 38: missing `\ ' after "etc."
let l:pattern = '^".\+", line \(\d\+\): \(.\+\)$'
let l:output = []

5
sources_non_forked/ale/ale_linters/thrift/thrift.vim

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
call ale#Set('thrift_thrift_executable', 'thrift')
call ale#Set('thrift_thrift_generators', ['cpp'])
call ale#Set('thrift_thrift_includes', [])
call ale#Set('thrift_thrift_includes', ['.'])
call ale#Set('thrift_thrift_options', '-strict')
function! ale_linters#thrift#thrift#GetCommand(buffer) abort
@ -42,12 +42,14 @@ function! ale_linters#thrift#thrift#Handle(buffer, lines) abort @@ -42,12 +42,14 @@ function! ale_linters#thrift#thrift#Handle(buffer, lines) abort
let l:line = a:lines[l:index]
let l:match = matchlist(l:line, l:pattern)
if empty(l:match)
let l:index += 1
continue
endif
let l:severity = l:match[1]
if l:severity is# 'WARNING'
let l:type = 'W'
else
@ -57,6 +59,7 @@ function! ale_linters#thrift#thrift#Handle(buffer, lines) abort @@ -57,6 +59,7 @@ function! ale_linters#thrift#thrift#Handle(buffer, lines) abort
" If our text looks like "(last token was ';')", the *next* line
" should contain a more descriptive error message.
let l:text = l:match[4]
if l:text =~# '\(last token was .*\)'
let l:index += 1
let l:text = get(a:lines, l:index, 'Unknown error ' . l:text)

28
sources_non_forked/ale/ale_linters/vim/ale_custom_linting_rules.vim

@ -25,7 +25,13 @@ endfunction @@ -25,7 +25,13 @@ endfunction
function! ale_linters#vim#ale_custom_linting_rules#GetCommand(buffer) abort
let l:dir = s:GetALEProjectDir(a:buffer)
return ale#path#CdString(l:dir) . '%e .'
let l:temp_dir = ale#engine#CreateDirectory(a:buffer)
let l:temp_file = l:temp_dir . '/example.vim'
let l:lines = getbufline(a:buffer, 1, '$')
call ale#util#Writefile(a:buffer, l:lines, l:temp_file)
return ale#path#CdString(l:dir) . '%e ' . ale#Escape(l:temp_dir)
endfunction
function! ale_linters#vim#ale_custom_linting_rules#Handle(buffer, lines) abort
@ -34,15 +40,17 @@ function! ale_linters#vim#ale_custom_linting_rules#Handle(buffer, lines) abort @@ -34,15 +40,17 @@ function! ale_linters#vim#ale_custom_linting_rules#Handle(buffer, lines) abort
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+) (.+)$'
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:filename = ale#path#GetAbsPath(l:dir, l:match[1])
if bufnr(l:filename) is a:buffer
call add(l:output, {
\ 'lnum': l:match[2],
\ 'text': l:match[3],
\ 'type': 'W',
\})
" Ignore trailing whitespace errors if we've turned them off.
if !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
\&& l:match[3] is# 'Trailing whitespace'
continue
endif
call add(l:output, {
\ 'lnum': l:match[2],
\ 'text': l:match[3],
\ 'type': 'W',
\})
endfor
return l:output
@ -53,5 +61,5 @@ call ale#linter#Define('vim', { @@ -53,5 +61,5 @@ call ale#linter#Define('vim', {
\ 'executable_callback': 'ale_linters#vim#ale_custom_linting_rules#GetExecutable',
\ 'command_callback': 'ale_linters#vim#ale_custom_linting_rules#GetCommand',
\ 'callback': 'ale_linters#vim#ale_custom_linting_rules#Handle',
\ 'lint_file': 1,
\ 'read_buffer': 0,
\})

4
sources_non_forked/ale/ale_linters/xml/xmllint.vim

@ -25,9 +25,9 @@ function! ale_linters#xml#xmllint#Handle(buffer, lines) abort @@ -25,9 +25,9 @@ function! ale_linters#xml#xmllint#Handle(buffer, lines) abort
let l:output = []
for l:line in a:lines
" Parse error/warning lines
let l:match_message = matchlist(l:line, l:pattern_message)
if !empty(l:match_message)
let l:line = l:match_message[2] + 0
let l:type = l:match_message[4] =~? 'warning' ? 'W' : 'E'
@ -44,13 +44,13 @@ function! ale_linters#xml#xmllint#Handle(buffer, lines) abort @@ -44,13 +44,13 @@ function! ale_linters#xml#xmllint#Handle(buffer, lines) abort
" Parse column position