-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
475aaf4
commit fb78133
Showing
447 changed files
with
9,841 additions
and
3,665 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
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,4 +1,4 @@ | ||
Copyright (c) 2016-2020, w0rp <[email protected]> | ||
Copyright (c) 2016-2023, Dense Analysis | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
|
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,5 @@ | ||
scriptencoding utf-8 | ||
" Author: David Houston <houstdav000> | ||
" Description: cspell support for Ada files. | ||
|
||
call ale#handlers#cspell#DefineLinter('ada') |
46 changes: 46 additions & 0 deletions
46
vim-config/plugins/ale/ale_linters/ansible/ansible_language_server.vim
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,46 @@ | ||
" Author: Horacio Sanson <https://github.com/hsanson> | ||
" Description: Support ansible language server https://github.com/ansible/ansible-language-server/ | ||
|
||
call ale#Set('ansible_language_server_executable', 'ansible-language-server') | ||
call ale#Set('ansible_language_server_config', {}) | ||
|
||
function! ale_linters#ansible#ansible_language_server#Executable(buffer) abort | ||
return ale#Var(a:buffer, 'ansible_language_server_executable') | ||
endfunction | ||
|
||
function! ale_linters#ansible#ansible_language_server#GetCommand(buffer) abort | ||
let l:executable = ale_linters#ansible#ansible_language_server#Executable(a:buffer) | ||
|
||
return ale#Escape(l:executable) . ' --stdio' | ||
endfunction | ||
|
||
function! ale_linters#ansible#ansible_language_server#FindProjectRoot(buffer) abort | ||
let l:dir = fnamemodify( | ||
\ ale#path#FindNearestFile(a:buffer, 'ansible.cfg'), | ||
\ ':h' | ||
\) | ||
|
||
if l:dir isnot# '.' && isdirectory(l:dir) | ||
return l:dir | ||
endif | ||
|
||
let l:dir = fnamemodify( | ||
\ ale#path#FindNearestDirectory(a:buffer, '.git'), | ||
\ ':h:h' | ||
\) | ||
|
||
if l:dir isnot# '.' && isdirectory(l:dir) | ||
return l:dir | ||
endif | ||
|
||
return '' | ||
endfunction | ||
|
||
call ale#linter#Define('ansible', { | ||
\ 'name': 'ansible-language-server', | ||
\ 'lsp': 'stdio', | ||
\ 'executable': function('ale_linters#ansible#ansible_language_server#Executable'), | ||
\ 'command': function('ale_linters#ansible#ansible_language_server#GetCommand'), | ||
\ 'project_root': function('ale_linters#ansible#ansible_language_server#FindProjectRoot'), | ||
\ 'lsp_config': {b -> ale#Var(b, 'ansible_language_server_config')} | ||
\}) |
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,5 @@ | ||
scriptencoding utf-8 | ||
" Author: David Houston <houstdav000> | ||
" Description: cspell support for ASCIIDoc files. | ||
|
||
call ale#handlers#cspell#DefineLinter('asciidoc') |
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,36 @@ | ||
" Author: Utkarsh Verma <[email protected]> | ||
" Description: AVRA linter for avra syntax. | ||
|
||
call ale#Set('avra_avra_executable', 'avra') | ||
call ale#Set('avra_avra_options', '') | ||
|
||
function! ale_linters#avra#avra#GetCommand(buffer) abort | ||
return '%e' | ||
\ . ' %t' | ||
\ . ale#Pad(ale#Var(a:buffer, 'avra_avra_options')) | ||
\ . ' -o ' . g:ale#util#nul_file | ||
endfunction | ||
|
||
function! ale_linters#avra#avra#Handle(buffer, lines) abort | ||
" Note that we treat 'fatal' as errors. | ||
let l:pattern = '^\S\+(\(\d\+\))\s\+:\s\+\(\S\+\)\s\+:\s\+\(.\+\)$' | ||
let l:output = [] | ||
|
||
for l:match in ale#util#GetMatches(a:lines, l:pattern) | ||
call add(l:output, { | ||
\ 'lnum': l:match[1] + 0, | ||
\ 'type': l:match[2] =~? 'Error' ? 'E' : 'W', | ||
\ 'text': l:match[3], | ||
\}) | ||
endfor | ||
|
||
return l:output | ||
endfunction | ||
|
||
call ale#linter#Define('avra', { | ||
\ 'name': 'avra', | ||
\ 'output_stream': 'stderr', | ||
\ 'executable': {b -> ale#Var(b, 'avra_avra_executable')}, | ||
\ 'command': function('ale_linters#avra#avra#GetCommand'), | ||
\ 'callback': 'ale_linters#avra#avra#Handle', | ||
\}) |
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,5 +1,5 @@ | ||
" Author: kmarc <[email protected]> | ||
" Description: This file adds support for using GNU awk with sripts. | ||
" Description: This file adds support for using GNU awk with scripts. | ||
|
||
call ale#Set('awk_gawk_executable', 'gawk') | ||
call ale#Set('awk_gawk_options', '') | ||
|
@@ -9,8 +9,9 @@ function! ale_linters#awk#gawk#GetCommand(buffer) abort | |
" gawk from attempting to execute the body of the script | ||
" it is linting. | ||
return '%e --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') | ||
\ . ' --lint' | ||
\ . ale#Pad(ale#Var(a:buffer, 'awk_gawk_options')) | ||
\ . ' -f %t --lint /dev/null' | ||
\ . ' -f %t /dev/null' | ||
endfunction | ||
|
||
call ale#linter#Define('awk', { | ||
|
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,64 @@ | ||
" Author: Carl Smedstad <carl.smedstad at protonmail dot com> | ||
" Description: bicep for bicep files | ||
|
||
let g:ale_bicep_bicep_executable = | ||
\ get(g:, 'ale_bicep_bicep_executable', 'bicep') | ||
|
||
let g:ale_bicep_bicep_options = | ||
\ get(g:, 'ale_bicep_bicep_options', '') | ||
|
||
function! ale_linters#bicep#bicep#Executable(buffer) abort | ||
return ale#Var(a:buffer, 'bicep_bicep_executable') | ||
endfunction | ||
|
||
function! ale_linters#bicep#bicep#Command(buffer) abort | ||
let l:executable = ale_linters#bicep#bicep#Executable(a:buffer) | ||
let l:options = ale#Var(a:buffer, 'bicep_bicep_options') | ||
|
||
if has('win32') | ||
let l:nullfile = 'NUL' | ||
else | ||
let l:nullfile = '/dev/null' | ||
endif | ||
|
||
return ale#Escape(l:executable) | ||
\ . ' build --outfile ' | ||
\ . l:nullfile | ||
\ . ' ' | ||
\ . l:options | ||
\ . ' %s' | ||
endfunction | ||
|
||
function! ale_linters#bicep#bicep#Handle(buffer, lines) abort | ||
let l:pattern = '\v^.*\((\d+),(\d+)\)\s:\s([a-zA-Z]*)\s([-a-zA-Z0-9]*):\s(.*)' | ||
let l:output = [] | ||
|
||
for l:match in ale#util#GetMatches(a:lines, l:pattern) | ||
if l:match[3] is# 'Error' | ||
let l:type = 'E' | ||
elseif l:match[3] is# 'Warning' | ||
let l:type = 'W' | ||
else | ||
let l:type = 'I' | ||
endif | ||
|
||
call add(l:output, { | ||
\ 'lnum': l:match[1] + 0, | ||
\ 'col': l:match[2] + 0, | ||
\ 'type': l:type, | ||
\ 'code': l:match[4], | ||
\ 'text': l:match[5], | ||
\}) | ||
endfor | ||
|
||
return l:output | ||
endfunction | ||
|
||
call ale#linter#Define('bicep', { | ||
\ 'name': 'bicep', | ||
\ 'executable': function('ale_linters#bicep#bicep#Executable'), | ||
\ 'command': function('ale_linters#bicep#bicep#Command'), | ||
\ 'callback': 'ale_linters#bicep#bicep#Handle', | ||
\ '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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
" Author: offa | ||
" Description: oelint-adv for BitBake files | ||
|
||
call ale#Set('bitbake_oelint_adv_executable', 'oelint-adv') | ||
call ale#Set('bitbake_oelint_adv_options', '') | ||
call ale#Set('bitbake_oelint_adv_config', '.oelint.cfg') | ||
|
||
function! ale_linters#bitbake#oelint_adv#Command(buffer) abort | ||
let l:config_file = ale#path#FindNearestFile(a:buffer, | ||
\ ale#Var(a:buffer, 'bitbake_oelint_adv_config')) | ||
|
||
return ((!empty(l:config_file)) | ||
\ ? 'OELINT_CONFIG=' . ale#Escape(l:config_file) . ' ' | ||
\ : '') | ||
\ . '%e --quiet ' | ||
\ . ale#Pad(ale#Var(a:buffer, 'bitbake_oelint_adv_options')) . '%s' | ||
endfunction | ||
|
||
function! ale_linters#bitbake#oelint_adv#Handle(buffer, lines) abort | ||
let l:pattern = '\v^(.+):(.+):(.+):(.+):(.+)$' | ||
let l:output = [] | ||
|
||
for l:match in ale#util#GetMatches(a:lines, l:pattern) | ||
call add(l:output, { | ||
\ 'lnum': str2nr(l:match[2]), | ||
\ 'type': l:match[3] is# 'error' | ||
\ ? 'E' : (l:match[3] is# 'warning' ? 'W' : 'I'), | ||
\ 'text': StripAnsiCodes(l:match[5]), | ||
\ 'code': l:match[4] | ||
\ }) | ||
endfor | ||
|
||
return l:output | ||
endfunction | ||
|
||
function! StripAnsiCodes(line) abort | ||
return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g') | ||
endfunction | ||
|
||
call ale#linter#Define('bitbake', { | ||
\ 'name': 'oelint_adv', | ||
\ 'output_stream': 'both', | ||
\ 'executable': {b -> ale#Var(b, 'bitbake_oelint_adv_executable')}, | ||
\ 'cwd': '%s:h', | ||
\ 'command': function('ale_linters#bitbake#oelint_adv#Command'), | ||
\ 'callback': 'ale_linters#bitbake#oelint_adv#Handle', | ||
\ }) |
Oops, something went wrong.