forked from dense-analysis/ale
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into fix-3271
* origin/master: (219 commits) Updated `solhint` linter to be able to use a local installation (dense-analysis#3682) Don't exit visual mode on floating preview close (dense-analysis#3689) hadolint: fix color output and stdin shown as "-" (dense-analysis#3680) feat: Add protolint as linter and fixer (dense-analysis#2911) apple-swift-format: linter and fixer with config swiftpm support (dense-analysis#3671) improve DMD handler (dense-analysis#3647) Add support for V: "v" (compiler) and "vfmt" fixer. (dense-analysis#3622) Add nixfmt as a Nix fixer. (dense-analysis#3651) Switch to using buildifier's -path option (dense-analysis#3640) Add support for `ptop` fixer (dense-analysis#3652) Add more parameters to the DMD linting command (dense-analysis#3639) dense-analysis#3633 - Move linter tests into test/linter Allow more time before PRs become stale Add support for clangd with CUDA (dense-analysis#3598) add support for svelte via svelteserver language server (dense-analysis#3644) dense-analysis#3633 - Put all dummy test files in test/test-files Add desktop-file-validate Fix a typo in a test filename issue 3033 (dense-analysis#3620) dense-analysis#3632 Add ale#util#MapMatches ...
- Loading branch information
Showing
980 changed files
with
8,957 additions
and
3,366 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,6 @@ | ||
--- | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask for Help | ||
url: https://github.com/dense-analysis/ale/discussions/new?category=q-a-ask-for-help-with-problems | ||
about: Ask for Help in ALE Discussions |
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,36 @@ | ||
--- | ||
name: CI | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: [ master ] # yamllint disable-line rule:brackets | ||
tags: | ||
- /^v\d+\.\d+\.(x|\d+)$/ | ||
pull_request: | ||
branches: [ master ] # yamllint disable-line rule:brackets | ||
|
||
jobs: | ||
build_image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build docker run image | ||
shell: bash | ||
env: | ||
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} | ||
DOCKER_HUB_PASS: ${{ secrets.DOCKER_HUB_PASS }} | ||
run: ./run-tests --build-image | ||
test_ale: | ||
needs: build_image | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
vim-version: | ||
- '--vim-80-only' | ||
- '--vim-82-only' | ||
- '--neovim-02-only' | ||
- '--neovim-04-only' | ||
- '--linters-only' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run tests | ||
run: ./run-tests -v ${{ matrix.vim-version }} |
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
" Author: Bartek Jasicki http://github.com/thindil | ||
" Description: Support for Ada Language Server | ||
|
||
call ale#Set('ada_adals_executable', 'ada_language_server') | ||
call ale#Set('ada_adals_project', 'default.gpr') | ||
call ale#Set('ada_adals_encoding', 'utf-8') | ||
|
||
function! ale_linters#ada#adals#GetAdaLSConfig(buffer) abort | ||
return { | ||
\ 'ada.projectFile': ale#Var(a:buffer, 'ada_adals_project'), | ||
\ 'ada.defaultCharset': ale#Var(a:buffer, 'ada_adals_encoding') | ||
\} | ||
endfunction | ||
|
||
function! ale_linters#ada#adals#GetRootDirectory(buffer) abort | ||
return fnamemodify(bufname(a:buffer), ':p:h') | ||
endfunction | ||
|
||
call ale#linter#Define('ada', { | ||
\ 'name': 'adals', | ||
\ 'lsp': 'stdio', | ||
\ 'executable': {b -> ale#Var(b, 'ada_adals_executable')}, | ||
\ 'command': '%e', | ||
\ 'project_root': function('ale_linters#ada#adals#GetRootDirectory'), | ||
\ 'lsp_config': function('ale_linters#ada#adals#GetAdaLSConfig') | ||
\}) |
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 @@ | ||
" Author: Bjorn Neergaard <[email protected]> | ||
" Authors: Bjorn Neergaard <[email protected]>, Vytautas Macionis <[email protected]> | ||
" Description: ansible-lint for ansible-yaml files | ||
|
||
call ale#Set('ansible_ansible_lint_executable', 'ansible-lint') | ||
|
@@ -7,7 +7,7 @@ function! ale_linters#ansible#ansible_lint#GetExecutable(buffer) abort | |
return ale#Var(a:buffer, 'ansible_ansible_lint_executable') | ||
endfunction | ||
|
||
function! ale_linters#ansible#ansible_lint#Handle(buffer, lines) abort | ||
function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort | ||
for l:line in a:lines[:10] | ||
if match(l:line, '^Traceback') >= 0 | ||
return [{ | ||
|
@@ -18,39 +18,86 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, lines) abort | |
endif | ||
endfor | ||
|
||
" Matches patterns line the following: | ||
" | ||
" test.yml:35: [EANSIBLE0002] Trailing whitespace | ||
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?: \[?([[:alnum:]]+)\]? (.*)$' | ||
let l:version_group = ale#semver#GTE(a:version, [5, 0, 0]) ? '>=5.0.0' : '<5.0.0' | ||
let l:output = [] | ||
|
||
for l:match in ale#util#GetMatches(a:lines, l:pattern) | ||
let l:code = l:match[4] | ||
if '>=5.0.0' is# l:version_group | ||
" Matches patterns line the following: | ||
" test.yml:3:148: syntax-check 'var' is not a valid attribute for a Play | ||
" roles/test/tasks/test.yml:8: [package-latest] [VERY_LOW] Package installs should not use latest | ||
" D:\test\tasks\test.yml:8: [package-latest] [VERY_LOW] package installs should not use latest | ||
let l:pattern = '\v^(%([a-zA-Z]:)?[^:]+):(\d+):%((\d+):)? %(\[([-[:alnum:]]+)\]) %(\[([_[:alnum:]]+)\]) (.*)$' | ||
let l:error_codes = { 'VERY_HIGH': 'E', 'HIGH': 'E', 'MEDIUM': 'W', 'LOW': 'W', 'VERY_LOW': 'W', 'INFO': 'I' } | ||
|
||
if l:code is# 'EANSIBLE0002' | ||
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') | ||
" Skip warnings for trailing whitespace if the option is off. | ||
continue | ||
endif | ||
for l:match in ale#util#GetMatches(a:lines, l:pattern) | ||
if ale#path#IsBufferPath(a:buffer, l:match[1]) | ||
call add(l:output, { | ||
\ 'lnum': l:match[2] + 0, | ||
\ 'col': l:match[3] + 0, | ||
\ 'text': l:match[6], | ||
\ 'code': l:match[4], | ||
\ 'type': l:error_codes[l:match[5]], | ||
\}) | ||
endif | ||
endfor | ||
endif | ||
|
||
if ale#path#IsBufferPath(a:buffer, l:match[1]) | ||
call add(l:output, { | ||
\ 'lnum': l:match[2] + 0, | ||
\ 'col': l:match[3] + 0, | ||
\ 'text': l:match[5], | ||
\ 'code': l:code, | ||
\ 'type': l:code[:0] is# 'E' ? 'E' : 'W', | ||
\}) | ||
endif | ||
endfor | ||
if '<5.0.0' is# l:version_group | ||
" Matches patterns line the following: | ||
" test.yml:35: [EANSIBLE0002] Trailing whitespace | ||
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?: \[?([[:alnum:]]+)\]? (.*)$' | ||
|
||
for l:match in ale#util#GetMatches(a:lines, l:pattern) | ||
let l:code = l:match[4] | ||
|
||
if l:code is# 'EANSIBLE0002' | ||
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') | ||
" Skip warnings for trailing whitespace if the option is off. | ||
continue | ||
endif | ||
|
||
if ale#path#IsBufferPath(a:buffer, l:match[1]) | ||
call add(l:output, { | ||
\ 'lnum': l:match[2] + 0, | ||
\ 'col': l:match[3] + 0, | ||
\ 'text': l:match[5], | ||
\ 'code': l:code, | ||
\ 'type': l:code[:0] is# 'E' ? 'E' : 'W', | ||
\}) | ||
endif | ||
endfor | ||
endif | ||
|
||
return l:output | ||
endfunction | ||
|
||
function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort | ||
let l:commands = { | ||
\ '>=5.0.0': '%e --parseable-severity -x yaml', | ||
\ '<5.0.0': '%e -p %t' | ||
\} | ||
let l:command = ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : l:commands['<5.0.0'] | ||
|
||
return l:command | ||
endfunction | ||
|
||
call ale#linter#Define('ansible', { | ||
\ 'name': 'ansible_lint', | ||
\ 'aliases': ['ansible', 'ansible-lint'], | ||
\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'), | ||
\ 'command': '%e -p %t', | ||
\ 'callback': 'ale_linters#ansible#ansible_lint#Handle', | ||
\ 'command': {buffer -> ale#semver#RunWithVersionCheck( | ||
\ buffer, | ||
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer), | ||
\ '%e --version', | ||
\ function('ale_linters#ansible#ansible_lint#GetCommand'), | ||
\ )}, | ||
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck( | ||
\ buffer, | ||
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer), | ||
\ '%e --version', | ||
\ {buffer, version -> ale_linters#ansible#ansible_lint#Handle( | ||
\ buffer, | ||
\ l:version, | ||
\ lines)}, | ||
\ )}, | ||
\}) |
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,12 @@ | ||
" Author: Leo <[email protected]> | ||
" Description: apkbuild-lint from atools linter for APKBUILDs | ||
|
||
call ale#Set('apkbuild_apkbuild_lint_executable', 'apkbuild-lint') | ||
|
||
call ale#linter#Define('apkbuild', { | ||
\ 'name': 'apkbuild_lint', | ||
\ 'output_stream': 'stdout', | ||
\ 'executable': {b -> ale#Var(b, 'apkbuild_apkbuild_lint_executable')}, | ||
\ 'command': '%e %t', | ||
\ 'callback': 'ale#handlers#atools#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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
" Author: Leo <[email protected]> | ||
" Description: secfixes-check from atools linter for APKBUILDs | ||
|
||
call ale#Set('apkbuild_secfixes_check_executable', 'secfixes-check') | ||
|
||
call ale#linter#Define('apkbuild', { | ||
\ 'name': 'secfixes_check', | ||
\ 'output_stream': 'stdout', | ||
\ 'executable': {b -> ale#Var(b, 'apkbuild_secfixes_check_executable')}, | ||
\ 'command': '%e %t', | ||
\ 'callback': 'ale#handlers#atools#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
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.