-
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
202 changed files
with
306,918 additions
and
203,617 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
" Author: Hyuksang Kwon <gwonhyuksang@gmail.com> | ||
" Description: eslint for astro files | ||
|
||
call ale#linter#Define('astro', { | ||
\ 'name': 'eslint', | ||
\ 'output_stream': 'both', | ||
\ 'executable': function('ale#handlers#eslint#GetExecutable'), | ||
\ 'cwd': function('ale#handlers#eslint#GetCwd'), | ||
\ 'command': function('ale#handlers#eslint#GetCommand'), | ||
\ 'callback': 'ale#handlers#eslint#HandleJSON', | ||
\}) |
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
6 changes: 6 additions & 0 deletions
6
sources_non_forked/ale/ale_linters/glimmer/embertemplatelint.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,6 @@ | ||
" Author: Sam Saffron <sam.saffron@gmail.com> | ||
" Description: Ember-template-lint for checking GJS (Glimmer JS) files | ||
|
||
scriptencoding utf-8 | ||
|
||
call ale#handlers#embertemplatelint#DefineLinter('glimmer') |
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
60 changes: 2 additions & 58 deletions
60
sources_non_forked/ale/ale_linters/handlebars/embertemplatelint.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 |
---|---|---|
@@ -1,62 +1,6 @@ | ||
" Author: Adrian Zalewski <aazalewski@hotmail.com> | ||
" Description: Ember-template-lint for checking Handlebars files | ||
|
||
call ale#Set('handlebars_embertemplatelint_executable', 'ember-template-lint') | ||
call ale#Set('handlebars_embertemplatelint_use_global', get(g:, 'ale_use_global_executables', 0)) | ||
scriptencoding utf-8 | ||
|
||
function! ale_linters#handlebars#embertemplatelint#GetExecutable(buffer) abort | ||
return ale#path#FindExecutable(a:buffer, 'handlebars_embertemplatelint', [ | ||
\ 'node_modules/.bin/ember-template-lint', | ||
\]) | ||
endfunction | ||
|
||
function! ale_linters#handlebars#embertemplatelint#GetCommand(buffer, version) abort | ||
if ale#semver#GTE(a:version, [4, 0, 0]) | ||
" --json was removed in favor of --format=json in ember-template-lint@4.0.0 | ||
return '%e --format=json --filename %s' | ||
endif | ||
|
||
return '%e --json --filename %s' | ||
endfunction | ||
|
||
function! ale_linters#handlebars#embertemplatelint#GetCommandWithVersionCheck(buffer) abort | ||
return ale#semver#RunWithVersionCheck( | ||
\ a:buffer, | ||
\ ale_linters#handlebars#embertemplatelint#GetExecutable(a:buffer), | ||
\ '%e --version', | ||
\ function('ale_linters#handlebars#embertemplatelint#GetCommand'), | ||
\) | ||
endfunction | ||
|
||
function! ale_linters#handlebars#embertemplatelint#Handle(buffer, lines) abort | ||
let l:output = [] | ||
let l:json = ale#util#FuzzyJSONDecode(a:lines, {}) | ||
|
||
for l:error in get(values(l:json), 0, []) | ||
if has_key(l:error, 'fatal') | ||
call add(l:output, { | ||
\ 'lnum': get(l:error, 'line', 1), | ||
\ 'col': get(l:error, 'column', 1), | ||
\ 'text': l:error.message, | ||
\ 'type': l:error.severity == 1 ? 'W' : 'E', | ||
\}) | ||
else | ||
call add(l:output, { | ||
\ 'lnum': l:error.line, | ||
\ 'col': l:error.column, | ||
\ 'text': l:error.rule . ': ' . l:error.message, | ||
\ 'type': l:error.severity == 1 ? 'W' : 'E', | ||
\}) | ||
endif | ||
endfor | ||
|
||
return l:output | ||
endfunction | ||
|
||
call ale#linter#Define('handlebars', { | ||
\ 'name': 'embertemplatelint', | ||
\ 'aliases': ['ember-template-lint'], | ||
\ 'executable': function('ale_linters#handlebars#embertemplatelint#GetExecutable'), | ||
\ 'command': function('ale_linters#handlebars#embertemplatelint#GetCommandWithVersionCheck'), | ||
\ 'callback': 'ale_linters#handlebars#embertemplatelint#Handle', | ||
\}) | ||
call ale#handlers#embertemplatelint#DefineLinter('handlebars') |
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,69 @@ | ||
" Description: Hurl linter using hurlfmt --check. | ||
" https://hurl.dev/ | ||
|
||
call ale#Set('hurl_hurlfmt_executable', 'hurlfmt') | ||
|
||
function! ale_linters#hurl#hurlfmt#GetCommand(buffer) abort | ||
return '%e' | ||
\ . ' --check --no-color ' | ||
endfunction | ||
|
||
function! ale_linters#hurl#hurlfmt#HandleOutput(buffer, lines) abort | ||
" Matches patterns: | ||
" | ||
" error: Parsing space | ||
" --> test.hurl:11:48 | ||
" | | ||
" 8 | header "Content-Type"= "application/json; charset=utf-8" | ||
" | ^ expecting a space | ||
" | | ||
" | ||
" error: Parsing URL | ||
" --> test.hurl:11:48 | ||
" | | ||
" 11 | PUT https://jsonplaceholder.typicode.com/posts/{post_id}} | ||
" | ^ illegal character <{> | ||
" | | ||
" | ||
" Note: hurlfmt seems to report always the first error only so we assume | ||
" there is only one error to make parsing easier. | ||
let l:output = [] | ||
|
||
if empty(a:lines) | ||
return l:output | ||
endif | ||
|
||
let l:pattern = '\v(error|warning): (.+) --\> (.+):(\d+):(\d+) .+ \^ (.+) |' | ||
let l:lines = join(a:lines, ' ') | ||
|
||
for l:match in ale#util#GetMatches(l:lines, l:pattern) | ||
call add(l:output, { | ||
\ 'bufnr': a:buffer, | ||
\ 'lnum': match[4] + 0, | ||
\ 'col': match[5] + 0, | ||
\ 'end_col': match[5] + 0, | ||
\ 'text': match[2] . ' : ' . match[6], | ||
\ 'type': (match[1] is# 'error') ? 'E' : 'W' | ||
\}) | ||
endfor | ||
|
||
return l:output | ||
endfunction | ||
|
||
function! ale_linters#hurl#hurlfmt#GetType(severity) abort | ||
if a:severity is? 'convention' | ||
\|| a:severity is? 'warning' | ||
\|| a:severity is? 'refactor' | ||
return 'W' | ||
endif | ||
|
||
return 'E' | ||
endfunction | ||
|
||
call ale#linter#Define('hurl', { | ||
\ 'name': 'hurlfmt', | ||
\ 'output_stream': 'stderr', | ||
\ 'executable': {b -> ale#Var(b, 'hurl_hurlfmt_executable')}, | ||
\ 'command': function('ale_linters#hurl#hurlfmt#GetCommand'), | ||
\ 'callback': 'ale_linters#hurl#hurlfmt#HandleOutput', | ||
\}) |
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,11 @@ | ||
" Author: Filip Gospodinov <f@gospodinov.ch> | ||
" Description: biome for JavaScript files | ||
|
||
call ale#linter#Define('javascript', { | ||
\ 'name': 'biome', | ||
\ 'lsp': 'stdio', | ||
\ 'language': function('ale#handlers#biome#GetLanguage'), | ||
\ 'executable': function('ale#handlers#biome#GetExecutable'), | ||
\ 'command': '%e lsp-proxy', | ||
\ 'project_root': function('ale#handlers#biome#GetProjectRoot'), | ||
\}) |
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,10 @@ | ||
" Description: biome for json files | ||
|
||
call ale#linter#Define('json', { | ||
\ 'name': 'biome', | ||
\ 'lsp': 'stdio', | ||
\ 'language': function('ale#handlers#biome#GetLanguage'), | ||
\ 'executable': function('ale#handlers#biome#GetExecutable'), | ||
\ 'command': '%e lsp-proxy', | ||
\ 'project_root': function('ale#handlers#biome#GetProjectRoot'), | ||
\}) |
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,10 @@ | ||
" Description: biome for jsonc files | ||
|
||
call ale#linter#Define('jsonc', { | ||
\ 'name': 'biome', | ||
\ 'lsp': 'stdio', | ||
\ 'language': function('ale#handlers#biome#GetLanguage'), | ||
\ 'executable': function('ale#handlers#biome#GetExecutable'), | ||
\ 'command': '%e lsp-proxy', | ||
\ 'project_root': function('ale#handlers#biome#GetProjectRoot'), | ||
\}) |
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.