-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
172 changed files
with
3,224 additions
and
1,201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
" Author: gagbo <gagbobada@gmail.com> | ||
" : luibo <ng.akhoa98@gmail.com> | ||
" : Jorengarenar <jorengarenar@outlook.com> | ||
" Description: clang-check linter for C files | ||
" modified from cpp/clangcheck.vim to match for C | ||
|
||
call ale#Set('c_clangcheck_executable', 'clang-check') | ||
call ale#Set('c_clangcheck_options', '') | ||
call ale#Set('c_build_dir', '') | ||
|
||
function! ale_linters#c#clangcheck#GetCommand(buffer) abort | ||
let l:user_options = ale#Var(a:buffer, 'c_clangcheck_options') | ||
|
||
" Try to find compilation database to link automatically | ||
let l:build_dir = ale#Var(a:buffer, 'c_build_dir') | ||
|
||
if empty(l:build_dir) | ||
let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) | ||
let l:build_dir = ale#path#Dirname(l:json_file) | ||
endif | ||
|
||
" The extra arguments in the command are used to prevent .plist files from | ||
" being generated. These are only added if no build directory can be | ||
" detected. | ||
return '%e -analyze %s' | ||
\ . (empty(l:build_dir) ? ' --extra-arg=-Xclang --extra-arg=-analyzer-output=text --extra-arg=-fno-color-diagnostics': '') | ||
\ . ale#Pad(l:user_options) | ||
\ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '') | ||
endfunction | ||
|
||
call ale#linter#Define('c', { | ||
\ 'name': 'clangcheck', | ||
\ 'output_stream': 'stderr', | ||
\ 'executable': {b -> ale#Var(b, 'c_clangcheck_executable')}, | ||
\ 'command': function('ale_linters#c#clangcheck#GetCommand'), | ||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', | ||
\ 'lint_file': 1, | ||
\}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
" Author: 0xhyoga <0xhyoga@gmx.com>, | ||
" Description: scarb for cairo files | ||
|
||
function! ale_linters#cairo#scarb#GetScarbExecutable(bufnr) abort | ||
if ale#path#FindNearestFile(a:bufnr, 'Scarb.toml') isnot# '' | ||
return 'scarb' | ||
else | ||
" if there is no Scarb.toml file, we don't use scarb even if it exists, | ||
" so we return '', because executable('') apparently always fails | ||
return '' | ||
endif | ||
endfunction | ||
|
||
function! ale_linters#cairo#scarb#GetCommand(buffer, version) abort | ||
return 'scarb build' | ||
endfunction | ||
|
||
call ale#linter#Define('cairo', { | ||
\ 'name': 'scarb', | ||
\ 'executable': function('ale_linters#cairo#scarb#GetScarbExecutable'), | ||
\ 'command': {buffer -> ale#semver#RunWithVersionCheck( | ||
\ buffer, | ||
\ ale_linters#cairo#scarb#GetScarbExecutable(buffer), | ||
\ '%e --version', | ||
\ function('ale_linters#cairo#scarb#GetCommand'), | ||
\ )}, | ||
\ 'callback': 'ale#handlers#cairo#HandleCairoErrors', | ||
\ 'output_stream': 'both', | ||
\ 'lint_file': 1, | ||
\}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
" Author: Axel Clark <axelclark@pm.me> | ||
" Description: Lexical integration (https://github.com/lexical-lsp/lexical) | ||
|
||
call ale#Set('elixir_lexical_release', 'lexical') | ||
|
||
function! ale_linters#elixir#lexical#GetExecutable(buffer) abort | ||
let l:dir = ale#path#Simplify(ale#Var(a:buffer, 'elixir_lexical_release')) | ||
let l:cmd = has('win32') ? '\start_lexical.bat' : '/start_lexical.sh' | ||
|
||
return l:dir . l:cmd | ||
endfunction | ||
|
||
call ale#linter#Define('elixir', { | ||
\ 'name': 'lexical', | ||
\ 'lsp': 'stdio', | ||
\ 'executable': function('ale_linters#elixir#lexical#GetExecutable'), | ||
\ 'command': function('ale_linters#elixir#lexical#GetExecutable'), | ||
\ 'project_root': function('ale#handlers#elixir#FindMixUmbrellaRoot'), | ||
\}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
" Author: neersighted <bjorn@neersighted.com> | ||
" Author: neersighted <bjorn@neersighted.com>, John Eikenberry <jae@zhar.net> | ||
" Description: go vet for Go files | ||
" | ||
" 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#go#EnvString(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': {b -> ale#Var(b, 'go_go_executable')}, | ||
\ 'cwd': '%s:h', | ||
\ 'command': function('ale_linters#go#govet#GetCommand'), | ||
\ 'command': {b -> | ||
\ ale#go#EnvString(b) | ||
\ . '%e vet' | ||
\ . ale#Pad(ale#Var(b, 'go_govet_options')) | ||
\ . ' .' | ||
\ }, | ||
\ 'callback': 'ale#handlers#go#Handler', | ||
\ 'lint_file': 1, | ||
\}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.