1
0
Fork 0
mirror of synced 2024-11-19 23:35:35 -05:00

Added missing commits

This commit is contained in:
Amir Salihefendic 2019-03-11 17:39:30 -03:00
parent f50b2142bc
commit bf7b5985f1
28 changed files with 1928 additions and 0 deletions

View file

@ -0,0 +1,9 @@
" Author: TANIGUCHI Masaya <ta2gch@gmail.com>
" Description: textlint for AsciiDoc files
call ale#linter#Define('asciidoc', {
\ 'name': 'textlint',
\ 'executable': function('ale#handlers#textlint#GetExecutable'),
\ 'command': function('ale#handlers#textlint#GetCommand'),
\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput',
\})

View file

@ -0,0 +1,57 @@
" Author: Harrison Bachrach - https://github.com/HarrisonB
" Description: Ameba, a linter for crystal files
call ale#Set('crystal_ameba_executable', 'bin/ameba')
function! ale_linters#crystal#ameba#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'crystal_ameba_executable')
return ale#Escape(l:executable)
\ . ' --format json '
\ . ale#Escape(expand('#' . a:buffer . ':p'))
endfunction
" Handle output from ameba
function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort
if len(a:lines) == 0
return []
endif
let l:errors = ale#util#FuzzyJSONDecode(a:lines[0], {})
if !has_key(l:errors, 'summary')
\|| l:errors['summary']['issues_count'] == 0
\|| empty(l:errors['sources'])
return []
endif
let l:output = []
for l:error in l:errors['sources'][0]['issues']
let l:start_col = str2nr(l:error['location']['column'])
let l:end_col = str2nr(l:error['end_location']['column'])
if !l:end_col
let l:end_col = l:start_col + 1
endif
call add(l:output, {
\ 'lnum': str2nr(l:error['location']['line']),
\ 'col': l:start_col,
\ 'end_col': l:end_col,
\ 'code': l:error['rule_name'],
\ 'text': l:error['message'],
\ 'type': 'W',
\})
endfor
return l:output
endfunction
call ale#linter#Define('crystal', {
\ 'name': 'ameba',
\ 'executable': {b -> ale#Var(b, 'crystal_ameba_executable')},
\ 'command': function('ale_linters#crystal#ameba#GetCommand'),
\ 'callback': 'ale_linters#crystal#ameba#HandleAmebaOutput',
\ 'lint_file': 1,
\})

View file

@ -0,0 +1,26 @@
" Author: Francisco Lopes <francisco@oblita.com>
" Description: Linting for Neo4j's Cypher
function! ale_linters#cypher#cypher_lint#Handle(buffer, lines) abort
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+): (.*)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'text': l:match[4],
\ 'type': 'E',
\})
endfor
return l:output
endfunction
call ale#linter#Define('cypher', {
\ 'name': 'cypher_lint',
\ 'executable': 'cypher-lint',
\ 'command': 'cypher-lint',
\ 'output_stream': 'stderr',
\ 'callback': 'ale_linters#cypher#cypher_lint#Handle',
\})

View file

@ -0,0 +1,68 @@
" Author: Martino Pilia <martino.pilia@gmail.com>
" Description: bandit linting for python files
call ale#Set('python_bandit_executable', 'bandit')
call ale#Set('python_bandit_options', '')
call ale#Set('python_bandit_use_config', 1)
call ale#Set('python_bandit_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_bandit_auto_pipenv', 0)
function! ale_linters#python#bandit#GetExecutable(buffer) abort
if (
\ ale#Var(a:buffer, 'python_auto_pipenv')
\ || ale#Var(a:buffer, 'python_bandit_auto_pipenv')
\) && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_bandit', ['bandit'])
endfunction
function! ale_linters#python#bandit#GetCommand(buffer) abort
let l:executable = ale_linters#python#bandit#GetExecutable(a:buffer)
let l:flags = ' --format custom'
\ . ' --msg-template "{line}:{test_id}:{severity}:{msg}" '
if ale#Var(a:buffer, 'python_bandit_use_config')
let l:config_path = ale#path#FindNearestFile(a:buffer, '.bandit')
if !empty(l:config_path)
let l:flags = ' --ini ' . ale#Escape(l:config_path) . l:flags
endif
endif
let l:exec_args = l:executable =~? 'pipenv$'
\ ? ' run bandit'
\ : ''
return ale#Escape(l:executable) . l:exec_args
\ . l:flags
\ . ale#Pad(ale#Var(a:buffer, 'python_bandit_options'))
\ . ' -'
endfunction
function! ale_linters#python#bandit#Handle(buffer, lines) abort
" Custom format defined in GetCommand via --msg-template
let l:pattern = '\v^([0-9]+):(B[0-9]+):([A-Z]+):(.*)$'
let l:severity = {'LOW': 'I', 'MEDIUM': 'W', 'HIGH': 'E'}
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': str2nr(l:match[1]),
\ 'code': l:match[2],
\ 'type': l:severity[l:match[3]],
\ 'text': l:match[4],
\})
endfor
return l:output
endfunction
call ale#linter#Define('python', {
\ 'name': 'bandit',
\ 'executable': function('ale_linters#python#bandit#GetExecutable'),
\ 'command': function('ale_linters#python#bandit#GetCommand'),
\ 'callback': 'ale_linters#python#bandit#Handle',
\})

View file

@ -0,0 +1,92 @@
" Author: Kevin Locke <kevin@kevinlocke.name>
" Description: pylama for python files
call ale#Set('python_pylama_executable', 'pylama')
call ale#Set('python_pylama_options', '')
call ale#Set('python_pylama_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pylama_auto_pipenv', 0)
call ale#Set('python_pylama_change_directory', 1)
function! ale_linters#python#pylama#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pylama_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif
return ale#python#FindExecutable(a:buffer, 'python_pylama', ['pylama'])
endfunction
function! ale_linters#python#pylama#GetCommand(buffer) abort
let l:cd_string = ''
if ale#Var(a:buffer, 'python_pylama_change_directory')
" Pylama loads its configuration from the current directory only, and
" applies file masks using paths relative to the current directory.
" Run from project root, if found, otherwise buffer dir.
let l:project_root = ale#python#FindProjectRoot(a:buffer)
let l:cd_string = l:project_root isnot# ''
\ ? ale#path#CdString(l:project_root)
\ : ale#path#BufferCdString(a:buffer)
endif
let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer)
let l:exec_args = l:executable =~? 'pipenv$'
\ ? ' run pylama'
\ : ''
" Note: Using %t to lint changes would be preferable, but many pylama
" checks use surrounding paths (e.g. C0103 module name, E0402 relative
" import beyond top, etc.). Neither is ideal.
return l:cd_string
\ . ale#Escape(l:executable) . l:exec_args
\ . ale#Pad(ale#Var(a:buffer, 'python_pylama_options'))
\ . ' %s'
endfunction
function! ale_linters#python#pylama#Handle(buffer, lines) abort
if empty(a:lines)
return []
endif
let l:output = ale#python#HandleTraceback(a:lines, 1)
let l:pattern = '\v^.{-}:([0-9]+):([0-9]+): +%(([A-Z][0-9]+):? +)?(.*)$'
" First letter of error code is a pylint-compatible message type
" http://pylint.pycqa.org/en/latest/user_guide/output.html#source-code-analysis-section
" D is for Documentation (pydocstyle)
let l:pylint_type_to_ale_type = {
\ 'I': 'I',
\ 'R': 'W',
\ 'C': 'W',
\ 'W': 'W',
\ 'E': 'E',
\ 'F': 'E',
\ 'D': 'W',
\}
let l:pylint_type_to_ale_sub_type = {
\ 'R': 'style',
\ 'C': 'style',
\ 'D': 'style',
\}
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': str2nr(l:match[1]),
\ 'col': str2nr(l:match[2]),
\ 'code': l:match[3],
\ 'type': get(l:pylint_type_to_ale_type, l:match[3][0], 'W'),
\ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:match[3][0], ''),
\ 'text': l:match[4],
\})
endfor
return l:output
endfunction
call ale#linter#Define('python', {
\ 'name': 'pylama',
\ 'executable': function('ale_linters#python#pylama#GetExecutable'),
\ 'command': function('ale_linters#python#pylama#GetCommand'),
\ 'callback': 'ale_linters#python#pylama#Handle',
\ 'lint_file': 1,
\})

View file

@ -0,0 +1,33 @@
" Author: aqui18 <https://github.com/aqui18>
" Description: This file adds support for checking Racket code with raco.
" This is the same form of syntax-checking used by DrRacket as well. The
" downside is that it will only catch the first error, but none of the
" subsequent ones. This is due to how evaluation in Racket works.
function! ale_linters#racket#raco#Handle(buffer, lines) abort
" Matches patterns
" <file>:<line>:<column> <message>
" eg:
" info.rkt:4:0: infotab-module: not a well-formed definition
let l:pattern = '^\(\s\)\@!\(.\+\):\(\d\+\):\(\d\+\): \(.\+\)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[3] + 0,
\ 'col': l:match[4] + 0,
\ 'type': 'E',
\ 'text': l:match[5],
\})
endfor
return l:output
endfunction
call ale#linter#Define('racket', {
\ 'name': 'raco',
\ 'executable': 'raco',
\ 'output_stream': 'stderr',
\ 'command': 'raco expand %s',
\ 'callback': 'ale_linters#racket#raco#Handle',
\})

View file

@ -0,0 +1,9 @@
" Author: hokorobi <hokorobi.hokorobi@gmail.com>
" Description: textlint, a proofreading tool (https://textlint.github.io/)
call ale#linter#Define('rst', {
\ 'name': 'textlint',
\ 'executable': function('ale#handlers#textlint#GetExecutable'),
\ 'command': function('ale#handlers#textlint#GetCommand'),
\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput',
\})

View file

@ -0,0 +1,21 @@
" Author: toastal <toastal@protonmail.com>
" Description: `stylelint` linter for SugarSS files
call ale#Set('sugarss_stylelint_executable', 'stylelint')
call ale#Set('sugarss_stylelint_options', '')
call ale#Set('sugarss_stylelint_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale_linters#sugarss#stylelint#GetCommand(buffer) abort
return '%e ' . ale#Pad(ale#Var(a:buffer, 'sugarss_stylelint_options'))
\ . ' --syntax=sugarss'
\ . ' --stdin-filename %s'
endfunction
call ale#linter#Define('sugarss', {
\ 'name': 'stylelint',
\ 'executable': {b -> ale#node#FindExecutable(b, 'sugarss_stylelint', [
\ 'node_modules/.bin/stylelint',
\ ])},
\ 'command': function('ale_linters#sugarss#stylelint#GetCommand'),
\ 'callback': 'ale#handlers#css#HandleStyleLintFormat',
\})

View file

@ -0,0 +1,9 @@
" Author: TANIGUCHI Masaya <ta2gch@gmail.com>
" Description: textlint for LaTeX files
call ale#linter#Define('tex', {
\ 'name': 'textlint',
\ 'executable': function('ale#handlers#textlint#GetExecutable'),
\ 'command': function('ale#handlers#textlint#GetCommand'),
\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput',
\})

View file

@ -0,0 +1,36 @@
" Author: John Gentile <johncgentile17@gmail.com>
" Description: Adds support for Mentor Graphics Questa/ModelSim `vlog` Verilog compiler/checker
call ale#Set('verilog_vlog_executable', 'vlog')
" See `$ vlog -h` for more options
call ale#Set('verilog_vlog_options', '-quiet -lint')
function! ale_linters#verilog#vlog#GetCommand(buffer) abort
return '%e ' . ale#Pad(ale#Var(a:buffer, 'verilog_vlog_options')) . ' %t'
endfunction
function! ale_linters#verilog#vlog#Handle(buffer, lines) abort
"Matches patterns like the following:
"** Warning: add.v(7): (vlog-2623) Undefined variable: C.
"** Error: file.v(1): (vlog-13294) Identifier must be declared with a port mode: C.
let l:pattern = '^**\s\(\w*\):[a-zA-Z0-9\-\.\_\/ ]\+(\(\d\+\)):\s\+\(.*\)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'type': l:match[1] is? 'Error' ? 'E' : 'W',
\ 'text': l:match[3],
\})
endfor
return l:output
endfunction
call ale#linter#Define('verilog', {
\ 'name': 'vlog',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'verilog_vlog_executable')},
\ 'command': function('ale_linters#verilog#vlog#GetCommand'),
\ 'callback': 'ale_linters#verilog#vlog#Handle',
\})

View file

@ -0,0 +1,35 @@
" Author: John Gentile <johncgentile17@gmail.com>
" Description: Adds support for Xilinx Vivado `xvlog` Verilog compiler/checker
call ale#Set('verilog_xvlog_executable', 'xvlog')
call ale#Set('verilog_xvlog_options', '')
function! ale_linters#verilog#xvlog#GetCommand(buffer) abort
return '%e ' . ale#Pad(ale#Var(a:buffer, 'verilog_xvlog_options')) . ' %t'
endfunction
function! ale_linters#verilog#xvlog#Handle(buffer, lines) abort
"Matches patterns like the following:
" ERROR: [VRFC 10-1412] syntax error near output [/path/to/file.v:5]
let l:pattern = '^ERROR:\s\+\(\[.*\)\[.*:\([0-9]\+\)\]'
let l:output = []
" NOTE: `xvlog` only prints 'INFO' and 'ERROR' messages
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'type': 'E',
\ 'text': l:match[1],
\})
endfor
return l:output
endfunction
call ale#linter#Define('verilog', {
\ 'name': 'xvlog',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'verilog_xvlog_executable')},
\ 'command': function('ale_linters#verilog#xvlog#GetCommand'),
\ 'callback': 'ale_linters#verilog#xvlog#Handle',
\})

View file

@ -0,0 +1,37 @@
" Author: John Gentile <johncgentile17@gmail.com>
" Description: Adds support for `ghdl` VHDL compiler/checker
call ale#Set('vhdl_ghdl_executable', 'ghdl')
" Compile w/VHDL-2008 support
call ale#Set('vhdl_ghdl_options', '--std=08')
function! ale_linters#vhdl#ghdl#GetCommand(buffer) abort
return '%e -s ' . ale#Pad(ale#Var(a:buffer, 'vhdl_ghdl_options')) . ' %t'
endfunction
function! ale_linters#vhdl#ghdl#Handle(buffer, lines) abort
" Look for 'error' lines like the following:
" dff_en.vhd:41:5:error: 'begin' is expected instead of 'if'
" /path/to/file.vhdl:12:8: no declaration for "i0"
let l:pattern = '^[a-zA-Z0-9\-\.\_\/ ]\+:\(\d\+\):\(\d\+\):\(.*\)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col' : l:match[2] + 0,
\ 'text': l:match[3],
\ 'type': 'E',
\})
endfor
return l:output
endfunction
call ale#linter#Define('vhdl', {
\ 'name': 'ghdl',
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'vhdl_ghdl_executable')},
\ 'command': function('ale_linters#vhdl#ghdl#GetCommand'),
\ 'callback': 'ale_linters#vhdl#ghdl#Handle',
\})

View file

@ -0,0 +1,38 @@
" Author: John Gentile <johncgentile17@gmail.com>
" Description: Adds support for Mentor Graphics Questa/ModelSim `vcom` VHDL compiler/checker
call ale#Set('vhdl_vcom_executable', 'vcom')
" Use VHDL-2008. See `$ vcom -h` for more options
call ale#Set('vhdl_vcom_options', '-2008 -quiet -lint')
function! ale_linters#vhdl#vcom#GetCommand(buffer) abort
return '%e ' . ale#Pad(ale#Var(a:buffer, 'vhdl_vcom_options')) . ' %t'
endfunction
function! ale_linters#vhdl#vcom#Handle(buffer, lines) abort
"Matches patterns like the following:
"** Warning: ../path/to/file.vhd(218): (vcom-1236) Shared variables must be of a protected type.
"** Error: tb_file.vhd(73): (vcom-1136) Unknown identifier "aresetn".
"** Error: tb_file.vhd(73): Bad resolution function (STD_LOGIC) for type (error).
"** Error: tb_file.vhd(73): near ":": (vcom-1576) expecting ';' or ')'.
let l:pattern = '^**\s\(\w*\):[a-zA-Z0-9\-\.\_\/ ]\+(\(\d\+\)):\s\+\(.*\)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'type': l:match[1] is? 'Error' ? 'E' : 'W',
\ 'text': l:match[3],
\})
endfor
return l:output
endfunction
call ale#linter#Define('vhdl', {
\ 'name': 'vcom',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'vhdl_vcom_executable')},
\ 'command': function('ale_linters#vhdl#vcom#GetCommand'),
\ 'callback': 'ale_linters#vhdl#vcom#Handle',
\})

View file

@ -0,0 +1,37 @@
" Author: John Gentile <johncgentile17@gmail.com>
" Description: Adds support for Xilinx Vivado `xvhdl` VHDL compiler/checker
call ale#Set('vhdl_xvhdl_executable', 'xvhdl')
" Use VHDL-2008. See `$ xvhdl -h` for more options
call ale#Set('vhdl_xvhdl_options', '--2008')
function! ale_linters#vhdl#xvhdl#GetCommand(buffer) abort
return '%e ' . ale#Pad(ale#Var(a:buffer, 'vhdl_xvhdl_options')) . ' %t'
endfunction
function! ale_linters#vhdl#xvhdl#Handle(buffer, lines) abort
"Matches patterns like the following:
" ERROR: [VRFC 10-91] aresetn is not declared [/path/to/file.vhd:17]
" ERROR: [VRFC 10-91] m_axis_tx_tdata is not declared [/home/user/tx_data.vhd:128]
let l:pattern = '^ERROR:\s\+\(\[.*\)\[.*:\([0-9]\+\)\]'
let l:output = []
" NOTE: `xvhdl` only prints 'INFO' and 'ERROR' messages
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'type': 'E',
\ 'text': l:match[1],
\})
endfor
return l:output
endfunction
call ale#linter#Define('vhdl', {
\ 'name': 'xvhdl',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'vhdl_xvhdl_executable')},
\ 'command': function('ale_linters#vhdl#xvhdl#GetCommand'),
\ 'callback': 'ale_linters#vhdl#xvhdl#Handle',
\})

View file

@ -0,0 +1,43 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: This module implements a function for parsing arguments for
" commands.
" Given a list of valid arguments like ['foo', 'bar'] and a string to parse,
" parse the arguments from the string and return [parsed_args, remainder].
"
" Arguments must be prefixed in the string with a single minus (-), and a
" double minus (--) denotes the end of arguments.
function! ale#args#Parse(arg_list, string) abort
let l:parsed = {}
let l:end_of_args = 0
let l:word_list = split(a:string, ' ')
let l:index = 0
while l:index < len(l:word_list)
let l:word = l:word_list[l:index]
if l:word[:0] is# '-'
let l:index += 1
if l:word is# '--'
break
endif
let l:arg = l:word[1:]
if index(a:arg_list, l:arg) >= 0
let l:parsed[l:arg] = ''
else
throw 'Invalid argument: ' . l:word
endif
elseif l:word is# ''
let l:index += 1
else
break
endif
endwhile
let l:new_string = join(l:word_list[l:index :], ' ')
return [l:parsed, l:new_string]
endfunction

View file

@ -0,0 +1,18 @@
" Author: Attila Maczak <attila@maczak.hu>
" Description: Integration of cmakeformat with ALE.
call ale#Set('cmake_cmakeformat_executable', 'cmake-format')
call ale#Set('cmake_cmakeformat_options', '')
function! ale#fixers#cmakeformat#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'cmake_cmakeformat_executable')
let l:options = ale#Var(a:buffer, 'cmake_cmakeformat_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' -i '
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction

View file

@ -0,0 +1,9 @@
" Author: Michael Phillips <michaeljoelphillips@gmail.com>
" Description: Fix Kotlin files with ktlint.
function! ale#fixers#ktlint#Fix(buffer) abort
return {
\ 'command': ale#handlers#ktlint#GetCommand(a:buffer) . ' --format',
\ 'read_temporary_file': 1,
\}
endfunction

View file

@ -0,0 +1,15 @@
" Author: TANIGUCHI Masaya <ta2gch@gmail.com>
" Description: Integration of textlint with ALE.
function! ale#fixers#textlint#Fix(buffer) abort
let l:executable = ale#handlers#textlint#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'textlint_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' --fix'
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction

View file

@ -0,0 +1,45 @@
" Author: Michael Phillips <michaeljoelphillips@gmail.com>
" Description: Handler functions for ktlint.
call ale#Set('kotlin_ktlint_executable', 'ktlint')
call ale#Set('kotlin_ktlint_rulesets', [])
call ale#Set('kotlin_ktlint_options', '')
function! ale#handlers#ktlint#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'kotlin_ktlint_executable')
let l:options = ale#Var(a:buffer, 'kotlin_ktlint_options')
let l:rulesets = ale#handlers#ktlint#GetRulesets(a:buffer)
return ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . (empty(l:rulesets) ? '' : ' ' . l:rulesets)
\ . ' %t'
endfunction
function! ale#handlers#ktlint#GetRulesets(buffer) abort
let l:rulesets = map(ale#Var(a:buffer, 'kotlin_ktlint_rulesets'), '''--ruleset '' . v:val')
return join(l:rulesets, ' ')
endfunction
function! ale#handlers#ktlint#Handle(buffer, lines) abort
let l:message_pattern = '^\(.*\):\([0-9]\+\):\([0-9]\+\):\s\+\(.*\)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:message_pattern)
let l:line = l:match[2] + 0
let l:column = l:match[3] + 0
let l:text = l:match[4]
let l:type = l:text =~? 'not a valid kotlin file' ? 'E' : 'W'
call add(l:output, {
\ 'lnum': l:line,
\ 'col': l:column,
\ 'text': l:text,
\ 'type': l:type
\})
endfor
return l:output
endfunction

View file

@ -0,0 +1,8 @@
" Author: Derek Sifford <dereksifford@gmail.com>
" Description: Handlers for tsserver
function! ale#handlers#tsserver#GetProjectRoot(buffer) abort
let l:tsconfig_file = ale#path#FindNearestFile(a:buffer, 'tsconfig.json')
return !empty(l:tsconfig_file) ? fnamemodify(l:tsconfig_file, ':h') : ''
endfunction

View file

@ -0,0 +1,31 @@
===============================================================================
ALE SugarSS Integration *ale-sugarss-options*
===============================================================================
stylelint *ale-sugarss-stylelint*
g:ale_sugarss_stylelint_executable *g:ale_sugarss_stylelint_executable*
*b:ale_sugarss_stylelint_executable*
Type: |String|
Default: `'stylelint'`
See |ale-integrations-local-executables|
g:ale_sugarss_stylelint_options *g:ale_sugarss_stylelint_options*
*b:ale_sugarss_stylelint_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to stylelint.
g:ale_sugarss_stylelint_use_global *g:ale_sugarss_stylelint_use_global*
*b:ale_sugarss_stylelint_use_global*
Type: |String|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View file

@ -0,0 +1,464 @@
*ale-supported-languages-and-tools.txt* For Vim version 8.0.
*ale-supported-list*
ALE Supported Languages and Tools
===============================================================================
The following languages and tools are supported by ALE.
Notes:
`^` No linters for text or Vim help filetypes are enabled by default.
`!!` These linters check only files on disk. See |ale-lint-file-linters|
* Ada
* `gcc`
* Ansible
* `ansible-lint`
* API Blueprint
* `drafter`
* AsciiDoc
* `alex`!!
* `proselint`
* `redpen`
* `textlint`
* `vale`
* `write-good`
* ASM
* `gcc`
* Awk
* `gawk`
* Bash
* `language-server`
* `shell` (-n flag)
* `shellcheck`
* `shfmt`
* BibTeX
* `bibclean`
* Bourne Shell
* `shell` (-n flag)
* `shellcheck`
* `shfmt`
* C
* `ccls`
* `clang`
* `clangd`
* `clang-format`
* `clangtidy`!!
* `cppcheck`
* `cpplint`!!
* `cquery`
* `flawfinder`
* `gcc`
* `uncrustify`
* C#
* `mcs`
* `mcsc`!!
* `uncrustify`
* C++ (filetype cpp)
* `ccls`
* `clang`
* `clangcheck`!!
* `clangd`
* `clang-format`
* `clangtidy`!!
* `clazy`!!
* `cppcheck`
* `cpplint`!!
* `cquery`
* `flawfinder`
* `gcc`
* `uncrustify`
* Chef
* `foodcritic`
* Clojure
* `joker`
* CloudFormation
* `cfn-python-lint`
* CMake
* `cmake-format`
* `cmakelint`
* CoffeeScript
* `coffee`
* `coffeelint`
* Crystal
* `ameba`!!
* `crystal`!!
* CSS
* `csslint`
* `prettier`
* `stylelint`
* Cucumber
* `cucumber`
* CUDA
* `nvcc`!!
* Cypher
* `cypher-lint`
* Cython (pyrex filetype)
* `cython`
* D
* `dls`
* `dmd`
* `uncrustify`
* Dafny
* `dafny`!!
* Dart
* `dartanalyzer`!!
* `dartfmt`!!
* `language_server`
* Dockerfile
* `dockerfile_lint`
* `hadolint`
* Elixir
* `credo`
* `dialyxir`
* `dogma`
* `elixir-ls`
* `mix`!!
* Elm
* `elm-format`
* `elm-make`
* Erb
* `erb`
* `erubi`
* `erubis`
* `ruumba`
* Erlang
* `erlc`
* `SyntaxErl`
* Fish
* `fish` (-n flag)
* Fortran
* `gcc`
* `language_server`
* Fountain
* `proselint`
* FusionScript
* `fusion-lint`
* Git Commit Messages
* `gitlint`
* GLSL
* glslang
* `glslls`
* Go
* `bingo`
* `go build`!!
* `gofmt`
* `goimports`
* `golangci-lint`!!
* `golangserver`
* `golint`
* `gometalinter`!!
* `go mod`!!
* `gosimple`!!
* `gotype`!!
* `go vet`!!
* `staticcheck`!!
* GraphQL
* `eslint`
* `gqlint`
* `prettier`
* Hack
* `hack`
* `hackfmt`
* `hhast`
* Haml
* `haml-lint`
* Handlebars
* `ember-template-lint`
* Haskell
* `brittany`
* `cabal-ghc`
* `ghc`
* `ghc-mod`
* `hdevtools`
* `hfmt`
* `hie`
* `hlint`
* `stack-build`!!
* `stack-ghc`
* `stylish-haskell`
* HCL
* `terraform-fmt`
* HTML
* `alex`!!
* `HTMLHint`
* `prettier`
* `proselint`
* `tidy`
* `write-good`
* Idris
* `idris`
* ISPC
* `ispc`!!
* Java
* `checkstyle`
* `google-java-format`
* `javac`
* `javalsp`
* `PMD`
* `uncrustify`
* JavaScript
* `eslint`
* `flow`
* `jscs`
* `jshint`
* `prettier`
* `prettier-eslint`
* `prettier-standard`
* `standard`
* `tsserver`
* `xo`
* JSON
* `fixjson`
* `jq`
* `jsonlint`
* `prettier`
* Julia
* `languageserver`
* Kotlin
* `kotlinc`!!
* `ktlint`!!
* `languageserver`
* LaTeX (tex)
* `alex`!!
* `chktex`
* `lacheck`
* `proselint`
* `redpen`
* `textlint`
* `vale`
* `write-good`
* Less
* `lessc`
* `prettier`
* `stylelint`
* LLVM
* `llc`
* Lua
* `luac`
* `luacheck`
* Mail
* `alex`!!
* `proselint`
* `vale`
* Make
* `checkmake`
* Markdown
* `alex`!!
* `markdownlint`!!
* `mdl`
* `prettier`
* `proselint`
* `redpen`
* `remark-lint`
* `textlint`
* `vale`
* `write-good`
* MATLAB
* `mlint`
* Mercury
* `mmc`!!
* NASM
* `nasm`!!
* Nim
* `nim check`!!
* nix
* `nix-instantiate`
* nroff
* `alex`!!
* `proselint`
* `write-good`
* Objective-C
* `ccls`
* `clang`
* `clangd`
* `uncrustify`
* Objective-C++
* `clang`
* `clangd`
* `uncrustify`
* OCaml
* `merlin` (see |ale-ocaml-merlin|)
* `ocamlformat`
* `ols`
* Pawn
* `uncrustify`
* Perl
* `perl -c`
* `perl-critic`
* `perltidy`
* Perl6
* `perl6 -c`
* PHP
* `langserver`
* `phan`
* `phpcbf`
* `phpcs`
* `php-cs-fixer`
* `php -l`
* `phpmd`
* `phpstan`
* `psalm`!!
* PO
* `alex`!!
* `msgfmt`
* `proselint`
* `write-good`
* Pod
* `alex`!!
* `proselint`
* `write-good`
* Pony
* `ponyc`
* Prolog
* `swipl`
* proto
* `protoc-gen-lint`
* Pug
* `pug-lint`
* Puppet
* `languageserver`
* `puppet`
* `puppet-lint`
* Python
* `autopep8`
* `bandit`
* `black`
* `flake8`
* `isort`
* `mypy`
* `prospector`
* `pycodestyle`
* `pydocstyle`
* `pylama`!!
* `pylint`!!
* `pyls`
* `pyre`
* `vulture`!!
* `yapf`
* QML
* `qmlfmt`
* `qmllint`
* R
* `lintr`
* Racket
* `raco`
* ReasonML
* `merlin`
* `ols`
* `refmt`
* reStructuredText
* `alex`!!
* `proselint`
* `redpen`
* `rstcheck`
* `textlint`
* `vale`
* `write-good`
* Re:VIEW
* `redpen`
* RPM spec
* `rpmlint`
* Ruby
* `brakeman`
* `rails_best_practices`!!
* `reek`
* `rubocop`
* `ruby`
* `rufo`
* `solargraph`
* `standardrb`
* Rust
* `cargo`!!
* `rls`
* `rustc` (see |ale-integration-rust|)
* `rustfmt`
* Sass
* `sass-lint`
* `stylelint`
* Scala
* `fsc`
* `sbtserver`
* `scalac`
* `scalafmt`
* `scalastyle`
* SCSS
* `prettier`
* `sass-lint`
* `scss-lint`
* `stylelint`
* Slim
* `slim-lint`
* SML
* `smlnj`
* Solidity
* `solhint`
* `solium`
* SQL
* `sqlfmt`
* `sqlint`
* Stylus
* `stylelint`
* SugarSS
* `stylelint`
* Swift
* `swiftformat`
* `swiftlint`
* Tcl
* `nagelfar`!!
* Terraform
* `fmt`
* `tflint`
* Texinfo
* `alex`!!
* `proselint`
* `write-good`
* Text^
* `alex`!!
* `proselint`
* `redpen`
* `textlint`
* `vale`
* `write-good`
* Thrift
* `thrift`
* TypeScript
* `eslint`
* `prettier`
* `tslint`
* `tsserver`
* `typecheck`
* VALA
* `uncrustify`
* Verilog
* `iverilog`
* `verilator`
* `vlog`
* `xvlog`
* VHDL
* `ghdl`
* `vcom`
* `xvhdl`
* Vim
* `vint`
* Vim help^
* `alex`!!
* `proselint`
* `write-good`
* Vue
* `prettier`
* `vls`
* XHTML
* `alex`!!
* `proselint`
* `write-good`
* XML
* `xmllint`
* YAML
* `prettier`
* `swaglint`
* `yamllint`
* YANG
* `yang-lsp`

View file

@ -0,0 +1,92 @@
===============================================================================
ALE VHDL Integration *ale-vhdl-options*
===============================================================================
ALE can use three different linters for VHDL:
iverilog:
Using `iverilog -t null -Wall`
ModelSim/Questa
Using `vcom -2008 -quiet -lint`
Vivado
Using `xvhdl --2008`
Note all linters default to VHDL-2008 support. This, and other options, can be
changed with each linter's respective option variable.
Linters/compilers that utilize a "work" directory for analyzing designs- such
as ModelSim and Vivado- can be passed the location of these directories as
part of their respective option strings listed below. This is useful for
holistic analysis of a file (e.g. a design with components, packages, or other
code defined external to the current file as part of a larger project) or
when wanting to simply pass an alternative location for the auto-generated
work directories (such as '/tmp') so as to not muddle the current directory.
Since these type of linters often use this work directory for holding compiled
design data as part of a single build process, they sometimes cannot handle
the frequent, asynchronous application launches when linting while text is
changing. This can happen in the form of hangs or crashes. To help prevent
this when using these linters, it may help to run linting less frequently; for
example, only when a file is saved.
===============================================================================
ghdl *ale-vhdl-ghdl*
g:ale_vhdl_ghdl_executable *g:ale_vhdl_ghdl_executable*
*b:ale_vhdl_ghdl_executable*
Type: |String|
Default: `'ghdl'`
This variable can be changed to the path to the 'ghdl' executable.
g:ale_vhdl_ghdl_options *g:ale_vhdl_ghdl_options*
*b:ale_vhdl_ghdl_options*
Type: |String|
Default: `'--std=08'`
This variable can be changed to modify the flags/options passed to 'ghdl'.
===============================================================================
vcom *ale-vhdl-vcom*
g:ale_vhdl_vcom_executable *g:ale_vhdl_vcom_executable*
*b:ale_vhdl_vcom_executable*
Type: |String|
Default: `'vcom'`
This variable can be changed to the path to the 'vcom' executable.
g:ale_vhdl_vcom_options *g:ale_vhdl_vcom_options*
*b:ale_vhdl_vcom_options*
Type: |String|
Default: `'-2008 -quiet -lint'`
This variable can be changed to modify the flags/options passed to 'vcom'.
===============================================================================
xvhdl *ale-vhdl-xvhdl*
g:ale_vhdl_xvhdl_executable *g:ale_vhdl_xvhdl_executable*
*b:ale_vhdl_xvhdl_executable*
Type: |String|
Default: `'xvhdl'`
This variable can be changed to the path to the 'xvhdl' executable.
g:ale_vhdl_xvhdl_options *g:ale_vhdl_xvhdl_options*
*b:ale_vhdl_xvhdl_options*
Type: |String|
Default: `'--2008'`
This variable can be changed to modify the flags/options passed to 'xvhdl'.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View file

@ -0,0 +1,473 @@
# ALE Supported Languages and Tools
This plugin supports the following languages and tools. All available
tools will be run in combination, so they can be complementary.
<!--
Keep the table rows sorted alphabetically by the language name,
and the tools in the tools column sorted alphabetically by the tool
name. That seems to be the fairest way to arrange this table.
Remember to also update doc/ale.txt, which has a similar list with different
formatting.
-->
**Legend**
| Key | Definition |
| ------------- | -------------------------------- |
| :floppy_disk: | Only checked when saved to disk |
| :warning: | Disabled by default |
---
* Ada
* [gcc](https://gcc.gnu.org)
* Ansible
* [ansible-lint](https://github.com/willthames/ansible-lint)
* API Blueprint
* [drafter](https://github.com/apiaryio/drafter)
* AsciiDoc
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [proselint](http://proselint.com/)
* [redpen](http://redpen.cc/)
* [textlint](https://textlint.github.io/)
* [vale](https://github.com/ValeLint/vale)
* [write-good](https://github.com/btford/write-good)
* ASM
* [gcc](https://gcc.gnu.org)
* Awk
* [gawk](https://www.gnu.org/software/gawk/)
* Bash
* [language-server](https://github.com/mads-hartmann/bash-language-server)
* shell [-n flag](https://www.gnu.org/software/bash/manual/bash.html#index-set)
* [shellcheck](https://www.shellcheck.net/)
* [shfmt](https://github.com/mvdan/sh)
* BibTeX
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
* Bourne Shell
* shell [-n flag](http://linux.die.net/man/1/sh)
* [shellcheck](https://www.shellcheck.net/)
* [shfmt](https://github.com/mvdan/sh)
* C
* [ccls](https://github.com/MaskRay/ccls)
* [clang](http://clang.llvm.org/)
* [clangd](https://clang.llvm.org/extra/clangd.html)
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
* [cppcheck](http://cppcheck.sourceforge.net)
* [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint)
* [cquery](https://github.com/cquery-project/cquery)
* [flawfinder](https://www.dwheeler.com/flawfinder/)
* [gcc](https://gcc.gnu.org/)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* C#
* [mcs](http://www.mono-project.com/docs/about-mono/languages/csharp/) see:`help ale-cs-mcs` for details
* [mcsc](http://www.mono-project.com/docs/about-mono/languages/csharp/) :floppy_disk: see:`help ale-cs-mcsc` for details and configuration
* [uncrustify](https://github.com/uncrustify/uncrustify)
* C++ (filetype cpp)
* [ccls](https://github.com/MaskRay/ccls)
* [clang](http://clang.llvm.org/)
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
* [clangd](https://clang.llvm.org/extra/clangd.html)
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
* [clazy](https://github.com/KDE/clazy) :floppy_disk:
* [cppcheck](http://cppcheck.sourceforge.net)
* [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) :floppy_disk:
* [cquery](https://github.com/cquery-project/cquery)
* [flawfinder](https://www.dwheeler.com/flawfinder/)
* [gcc](https://gcc.gnu.org/)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* Chef
* [foodcritic](http://www.foodcritic.io/)
* Clojure
* [joker](https://github.com/candid82/joker)
* CloudFormation
* [cfn-python-lint](https://github.com/awslabs/cfn-python-lint)
* CMake
* [cmake-format](https://github.com/cheshirekow/cmake_format)
* [cmakelint](https://github.com/richq/cmake-lint)
* CoffeeScript
* [coffee](http://coffeescript.org/)
* [coffeelint](https://www.npmjs.com/package/coffeelint)
* Crystal
* [ameba](https://github.com/veelenga/ameba) :floppy_disk:
* [crystal](https://crystal-lang.org/) :floppy_disk:
* CSS
* [csslint](http://csslint.net/)
* [prettier](https://github.com/prettier/prettier)
* [stylelint](https://github.com/stylelint/stylelint)
* Cucumber
* [cucumber](https://cucumber.io/)
* CUDA
* [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html)
* Cypher
* [cypher-lint](https://github.com/cleishm/libcypher-parser)
* Cython (pyrex filetype)
* [cython](http://cython.org/)
* D
* [dls](https://github.com/d-language-server/dls)
* [dmd](https://dlang.org/dmd-linux.html)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* Dafny
* [dafny](https://rise4fun.com/Dafny) :floppy_disk:
* Dart
* [dartanalyzer](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) :floppy_disk:
* [dartfmt](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt)
* [language_server](https://github.com/natebosch/dart_language_server)
* Dockerfile
* [dockerfile_lint](https://github.com/projectatomic/dockerfile_lint)
* [hadolint](https://github.com/hadolint/hadolint)
* Elixir
* [credo](https://github.com/rrrene/credo)
* [dialyxir](https://github.com/jeremyjh/dialyxir)
* [dogma](https://github.com/lpil/dogma)
* [elixir-ls](https://github.com/JakeBecker/elixir-ls)
* [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk:
* Elm
* [elm-format](https://github.com/avh4/elm-format)
* [elm-make](https://github.com/elm-lang/elm-make)
* Erb
* [erb](https://apidock.com/ruby/ERB)
* [erubi](https://github.com/jeremyevans/erubi)
* [erubis](https://github.com/kwatch/erubis)
* [ruumba](https://github.com/ericqweinstein/ruumba)
* Erlang
* [erlc](http://erlang.org/doc/man/erlc.html)
* [SyntaxErl](https://github.com/ten0s/syntaxerl)
* Fish
* fish [-n flag](https://linux.die.net/man/1/fish)
* Fortran
* [gcc](https://gcc.gnu.org/)
* [language_server](https://github.com/hansec/fortran-language-server)
* Fountain
* [proselint](http://proselint.com/)
* FusionScript
* [fusion-lint](https://github.com/RyanSquared/fusionscript)
* Git Commit Messages
* [gitlint](https://github.com/jorisroovers/gitlint)
* GLSL
* [glslang](https://github.com/KhronosGroup/glslang)
* [glslls](https://github.com/svenstaro/glsl-language-server)
* Go
* [bingo](https://github.com/saibing/bingo) :warning:
* [go build](https://golang.org/cmd/go/) :warning: :floppy_disk:
* [gofmt](https://golang.org/cmd/gofmt/)
* [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) :warning:
* [golangci-lint](https://github.com/golangci/golangci-lint) :warning: :floppy_disk:
* [golangserver](https://github.com/sourcegraph/go-langserver) :warning:
* [golint](https://godoc.org/github.com/golang/lint)
* [gometalinter](https://github.com/alecthomas/gometalinter) :warning: :floppy_disk:
* [go mod](https://golang.org/cmd/go/) :warning: :floppy_disk:
* [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) :warning: :floppy_disk:
* [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk:
* [go vet](https://golang.org/cmd/vet/) :floppy_disk:
* [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) :warning: :floppy_disk:
* GraphQL
* [eslint](http://eslint.org/)
* [gqlint](https://github.com/happylinks/gqlint)
* [prettier](https://github.com/prettier/prettier)
* Hack
* [hack](http://hacklang.org/)
* [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt)
* [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`)
* Haml
* [haml-lint](https://github.com/brigade/haml-lint)
* Handlebars
* [ember-template-lint](https://github.com/rwjblue/ember-template-lint)
* Haskell
* [brittany](https://github.com/lspitzner/brittany)
* [cabal-ghc](https://www.haskell.org/cabal/)
* [ghc](https://www.haskell.org/ghc/)
* [ghc-mod](https://github.com/DanielG/ghc-mod)
* [hdevtools](https://hackage.haskell.org/package/hdevtools)
* [hfmt](https://github.com/danstiner/hfmt)
* [hie](https://github.com/haskell/haskell-ide-engine)
* [hlint](https://hackage.haskell.org/package/hlint)
* [stack-build](https://haskellstack.org/) :floppy_disk:
* [stack-ghc](https://haskellstack.org/)
* [stylish-haskell](https://github.com/jaspervdj/stylish-haskell)
* HCL
* [terraform-fmt](https://github.com/hashicorp/terraform)
* HTML
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [HTMLHint](http://htmlhint.com/)
* [prettier](https://github.com/prettier/prettier)
* [proselint](http://proselint.com/)
* [tidy](http://www.html-tidy.org/)
* [write-good](https://github.com/btford/write-good)
* Idris
* [idris](http://www.idris-lang.org/)
* ISPC
* [ispc](https://ispc.github.io/) :floppy_disk:
* Java
* [checkstyle](http://checkstyle.sourceforge.net)
* [google-java-format](https://github.com/google/google-java-format)
* [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
* [javalsp](https://github.com/georgewfraser/vscode-javac)
* [PMD](https://pmd.github.io/)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* JavaScript
* [eslint](http://eslint.org/)
* [flow](https://flowtype.org/)
* [jscs](http://jscs.info/)
* [jshint](http://jshint.com/)
* [prettier](https://github.com/prettier/prettier)
* [prettier-eslint](https://github.com/prettier/prettier-eslint-cli)
* [prettier-standard](https://github.com/sheerun/prettier-standard)
* [standard](http://standardjs.com/)
* [tsserver](https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29)
* [xo](https://github.com/sindresorhus/xo)
* JSON
* [fixjson](https://github.com/rhysd/fixjson)
* [jq](https://stedolan.github.io/jq/)
* [jsonlint](http://zaa.ch/jsonlint/)
* [prettier](https://github.com/prettier/prettier)
* Julia
* [languageserver](https://github.com/JuliaEditorSupport/LanguageServer.jl)
* Kotlin
* [kotlinc](https://kotlinlang.org) :floppy_disk:
* [ktlint](https://ktlint.github.io) :floppy_disk:
* [languageserver](https://github.com/fwcd/KotlinLanguageServer) see `:help ale-integration-kotlin` for configuration instructions
* LaTeX
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [chktex](http://www.nongnu.org/chktex/)
* [lacheck](https://www.ctan.org/pkg/lacheck)
* [proselint](http://proselint.com/)
* [redpen](http://redpen.cc/)
* [textlint](https://textlint.github.io/)
* [vale](https://github.com/ValeLint/vale)
* [write-good](https://github.com/btford/write-good)
* Less
* [lessc](https://www.npmjs.com/package/less)
* [prettier](https://github.com/prettier/prettier)
* [stylelint](https://github.com/stylelint/stylelint)
* LLVM
* [llc](https://llvm.org/docs/CommandGuide/llc.html)
* Lua
* [luac](https://www.lua.org/manual/5.1/luac.html)
* [luacheck](https://github.com/mpeterv/luacheck)
* Mail
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [proselint](http://proselint.com/)
* [vale](https://github.com/ValeLint/vale)
* Make
* [checkmake](https://github.com/mrtazz/checkmake)
* Markdown
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [markdownlint](https://github.com/DavidAnson/markdownlint) :floppy_disk:
* [mdl](https://github.com/mivok/markdownlint)
* [prettier](https://github.com/prettier/prettier)
* [proselint](http://proselint.com/)
* [redpen](http://redpen.cc/)
* [remark-lint](https://github.com/wooorm/remark-lint)
* [textlint](https://textlint.github.io/)
* [vale](https://github.com/ValeLint/vale)
* [write-good](https://github.com/btford/write-good)
* MATLAB
* [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html)
* Mercury
* [mmc](http://mercurylang.org) :floppy_disk:
* NASM
* [nasm](https://www.nasm.us/) :floppy_disk:
* Nim
* [nim check](https://nim-lang.org/docs/nimc.html) :floppy_disk:
* nix
* [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate)
* nroff
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [proselint](http://proselint.com/)
* [write-good](https://github.com/btford/write-good)
* Objective-C
* [ccls](https://github.com/MaskRay/ccls)
* [clang](http://clang.llvm.org/)
* [clangd](https://clang.llvm.org/extra/clangd.html)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* Objective-C++
* [clang](http://clang.llvm.org/)
* [clangd](https://clang.llvm.org/extra/clangd.html)
* [uncrustify](https://github.com/uncrustify/uncrustify)
* OCaml
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions
* [ocamlformat](https://github.com/ocaml-ppx/ocamlformat)
* [ols](https://github.com/freebroccolo/ocaml-language-server)
* Pawn
* [uncrustify](https://github.com/uncrustify/uncrustify)
* Perl
* [perl -c](https://perl.org/) :warning:
* [perl-critic](https://metacpan.org/pod/Perl::Critic)
* [perltidy](https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy)
* Perl6
* [perl6 -c](https://perl6.org) :warning:
* PHP
* [langserver](https://github.com/felixfbecker/php-language-server)
* [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions
* [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer)
* [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)
* [php-cs-fixer](http://cs.sensiolabs.org/)
* [php -l](https://secure.php.net/)
* [phpmd](https://phpmd.org)
* [phpstan](https://github.com/phpstan/phpstan)
* [psalm](https://getpsalm.org) :floppy_disk:
* PO
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [msgfmt](https://www.gnu.org/software/gettext/manual/html_node/msgfmt-Invocation.html)
* [proselint](http://proselint.com/)
* [write-good](https://github.com/btford/write-good)
* Pod
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [proselint](http://proselint.com/)
* [write-good](https://github.com/btford/write-good)
* Pony
* [ponyc](https://github.com/ponylang/ponyc)
* Prolog
* [swipl](https://github.com/SWI-Prolog/swipl-devel)
* proto
* [protoc-gen-lint](https://github.com/ckaznocha/protoc-gen-lint)
* Pug
* [pug-lint](https://github.com/pugjs/pug-lint)
* Puppet
* [languageserver](https://github.com/lingua-pupuli/puppet-editor-services)
* [puppet](https://puppet.com)
* [puppet-lint](https://puppet-lint.com)
* Python
* [autopep8](https://github.com/hhatto/autopep8)
* [bandit](https://github.com/PyCQA/bandit) :warning:
* [black](https://github.com/ambv/black)
* [flake8](http://flake8.pycqa.org/en/latest/)
* [isort](https://github.com/timothycrosley/isort)
* [mypy](http://mypy-lang.org/)
* [prospector](https://github.com/PyCQA/prospector) :warning:
* [pycodestyle](https://github.com/PyCQA/pycodestyle) :warning:
* [pydocstyle](https://www.pydocstyle.org/) :warning:
* [pylama](https://github.com/klen/pylama) :floppy_disk:
* [pylint](https://www.pylint.org/) :floppy_disk:
* [pyls](https://github.com/palantir/python-language-server) :warning:
* [pyre](https://github.com/facebook/pyre-check) :warning:
* [vulture](https://github.com/jendrikseipp/vulture) :warning: :floppy_disk:
* [yapf](https://github.com/google/yapf)
* QML
* [qmlfmt](https://github.com/jesperhh/qmlfmt)
* [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint)
* R
* [lintr](https://github.com/jimhester/lintr)
* Racket
* [raco](https://docs.racket-lang.org/raco/)
* ReasonML
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions
* [ols](https://github.com/freebroccolo/ocaml-language-server)
* [refmt](https://github.com/reasonml/reason-cli)
* reStructuredText
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [proselint](http://proselint.com/)
* [redpen](http://redpen.cc/)
* [rstcheck](https://github.com/myint/rstcheck)
* [textlint](https://textlint.github.io/)
* [vale](https://github.com/ValeLint/vale)
* [write-good](https://github.com/btford/write-good)
* Re:VIEW
* [redpen](http://redpen.cc/)
* RPM spec
* [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`)
* Ruby
* [brakeman](http://brakemanscanner.org/) :floppy_disk:
* [rails_best_practices](https://github.com/flyerhzm/rails_best_practices) :floppy_disk:
* [reek](https://github.com/troessner/reek)
* [rubocop](https://github.com/bbatsov/rubocop)
* [ruby](https://www.ruby-lang.org)
* [rufo](https://github.com/ruby-formatter/rufo)
* [solargraph](https://solargraph.org)
* [standardrb](https://github.com/testdouble/standard)
* Rust
* [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions)
* [rls](https://github.com/rust-lang-nursery/rls) :warning:
* [rustc](https://www.rust-lang.org/) :warning:
* [rustfmt](https://github.com/rust-lang-nursery/rustfmt)
* Sass
* [sass-lint](https://www.npmjs.com/package/sass-lint)
* [stylelint](https://github.com/stylelint/stylelint)
* Scala
* [fsc](https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html)
* [sbtserver](https://www.scala-sbt.org/1.x/docs/sbt-server.html)
* [scalac](http://scala-lang.org)
* [scalafmt](https://scalameta.org/scalafmt/)
* [scalastyle](http://www.scalastyle.org)
* SCSS
* [prettier](https://github.com/prettier/prettier)
* [sass-lint](https://www.npmjs.com/package/sass-lint)
* [scss-lint](https://github.com/brigade/scss-lint)
* [stylelint](https://github.com/stylelint/stylelint)
* Slim
* [slim-lint](https://github.com/sds/slim-lint)
* SML
* [smlnj](http://www.smlnj.org/)
* Solidity
* [solhint](https://github.com/protofire/solhint)
* [solium](https://github.com/duaraghav8/Solium)
* SQL
* [sqlfmt](https://github.com/jackc/sqlfmt)
* [sqlint](https://github.com/purcell/sqlint)
* Stylus
* [stylelint](https://github.com/stylelint/stylelint)
* SugarSS
* [stylelint](https://github.com/stylelint/stylelint)
* Swift
* [swiftformat](https://github.com/nicklockwood/SwiftFormat)
* [swiftlint](https://github.com/realm/SwiftLint)
* Tcl
* [nagelfar](http://nagelfar.sourceforge.net) :floppy_disk:
* Terraform
* [fmt](https://github.com/hashicorp/terraform)
* [tflint](https://github.com/wata727/tflint)
* Texinfo
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [proselint](http://proselint.com/)
* [write-good](https://github.com/btford/write-good)
* Text
* [alex](https://github.com/wooorm/alex) :warning: :floppy_disk:
* [proselint](http://proselint.com/) :warning:
* [redpen](http://redpen.cc/) :warning:
* [textlint](https://textlint.github.io/) :warning:
* [vale](https://github.com/ValeLint/vale) :warning:
* [write-good](https://github.com/btford/write-good) :warning:
* Thrift
* [thrift](http://thrift.apache.org/)
* TypeScript
* [eslint](http://eslint.org/)
* [prettier](https://github.com/prettier/prettier)
* [tslint](https://github.com/palantir/tslint)
* [tsserver](https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29)
* typecheck
* VALA
* [uncrustify](https://github.com/uncrustify/uncrustify)
* Verilog
* [iverilog](https://github.com/steveicarus/iverilog)
* [verilator](http://www.veripool.org/projects/verilator/wiki/Intro)
* [vlog](https://www.mentor.com/products/fv/questa/)
* [xvlog](https://www.xilinx.com/products/design-tools/vivado.html)
* VHDL
* [ghdl](https://github.com/ghdl/ghdl)
* [vcom](https://www.mentor.com/products/fv/questa/)
* [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html)
* Vim
* [vint](https://github.com/Kuniwak/vint)
* Vim help
* [alex](https://github.com/wooorm/alex) :warning: :floppy_disk:
* [proselint](http://proselint.com/) :warning:
* [write-good](https://github.com/btford/write-good) :warning:
* Vue
* [prettier](https://github.com/prettier/prettier)
* [vls](https://github.com/vuejs/vetur/tree/master/server)
* XHTML
* [alex](https://github.com/wooorm/alex) :floppy_disk:
* [proselint](http://proselint.com/)
* [write-good](https://github.com/btford/write-good)
* XML
* [xmllint](http://xmlsoft.org/xmllint.html)
* YAML
* [prettier](https://github.com/prettier/prettier)
* [swaglint](https://github.com/byCedric/swaglint)
* [yamllint](https://yamllint.readthedocs.io/)
* YANG
* [yang-lsp](https://github.com/theia-ide/yang-lsp)

View file

@ -0,0 +1,30 @@
VIM LICENSE
I) There are no restrictions on distributing unmodified copies of Vim except that they must include this license text. You can also distribute unmodified parts of Vim, likewise unrestricted except that they must include this license text. You are also allowed to include executables that you made from the unmodified Vim sources, plus your own usage examples and Vim scripts.
II) It is allowed to distribute a modified (or extended) version of Vim, including executables and/or source code, when the following four conditions are met:
1) This license text must be included unmodified.
2) The modified Vim must be distributed in one of the following five ways:
a) If you make changes to Vim yourself, you must clearly describe in the distribution how to contact you. When the maintainer asks you (in any way) for a copy of the modified Vim you distributed, you must make your changes, including source code, available to the maintainer without fee. The maintainer reserves the right to include your changes in the official version of Vim. What the maintainer will do with your changes and under what license they will be distributed is negotiable. If there has been no negotiation then this license, or a later version, also applies to your changes. The current maintainer is Bram Moolenaar <Bram@vim.org>. If this changes it will be announced in appropriate places (most likely vim.sf.net, www.vim.org and/or comp.editors). When it is completely impossible to contact the maintainer, the obligation to send him your changes ceases. Once the maintainer has confirmed that he has received your changes they will not have to be sent again.
b) If you have received a modified Vim that was distributed as mentioned under a) you are allowed to further distribute it unmodified, as mentioned at I). If you make additional changes the text under a) applies to those changes.
c) Provide all the changes, including source code, with every copy of the modified Vim you distribute. This may be done in the form of a context diff. You can choose what license to use for new code you add. The changes and their license must not restrict others from making their own changes to the official version of Vim.
d) When you have a modified Vim which includes changes as mentioned under c), you can distribute it without the source code for the changes if the following three conditions are met:
- The license that applies to the changes permits you to distribute the changes to the Vim maintainer without fee or restriction, and permits the Vim maintainer to include the changes in the official version of Vim without fee or restriction.
- You keep the changes for at least three years after last distributing the corresponding modified Vim. When the maintainer or someone who you distributed the modified Vim to asks you (in any way) for the changes within this period, you must make them available to him.
- You clearly describe in the distribution how to contact you. This contact information must remain valid for at least three years after last distributing the corresponding modified Vim, or as long as possible.
e) When the GNU General Public License (GPL) applies to the changes, you can distribute the modified Vim under the GNU GPL version 2 or any later version.
3) A message must be added, at least in the output of the ":version" command and in the intro screen, such that the user of the modified Vim is able to see that it was modified. When distributing as mentioned under 2)e) adding the message is only required for as far as this does not conflict with the license used for the changes.
4) The contact information as required under 2)a) and 2)d) must not be removed or changed, except that the person himself can make corrections.
III) If you distribute a modified version of Vim, you are encouraged to use the Vim license for your changes and make them available to the maintainer, including the source code. The preferred way to do this is by e-mail or by uploading the files to a server and e-mailing the URL. If the number of changes is small (e.g., a modified Makefile) e-mailing a context diff will do. The e-mail address to be used is <maintainer@vim.org>
IV) It is not allowed to remove this license from the distribution of the Vim sources, parts of it or from a modified version. You may use this license for previous Vim releases instead of the license that they came with, at your option.

View file

@ -0,0 +1,84 @@
function! gitgutter#fold#enable()
call s:save_fold_state()
call s:set_fold_levels()
setlocal foldexpr=gitgutter#fold#level(v:lnum)
setlocal foldmethod=expr
setlocal foldlevel=0
setlocal foldenable
call gitgutter#utility#setbufvar(bufnr(''), 'folded', 1)
endfunction
function! gitgutter#fold#disable()
call s:restore_fold_state()
call gitgutter#utility#setbufvar(bufnr(''), 'folded', 0)
endfunction
function! gitgutter#fold#toggle()
if s:folded()
call gitgutter#fold#disable()
else
call gitgutter#fold#enable()
endif
endfunction
function! gitgutter#fold#level(lnum)
return gitgutter#utility#getbufvar(bufnr(''), 'fold_levels')[a:lnum]
endfunction
" A line in a hunk has a fold level of 0.
" A line within 3 lines of a hunk has a fold level of 1.
" All other lines have a fold level of 2.
function! s:set_fold_levels()
let fold_levels = ['']
for lnum in range(1, line('$'))
let in_hunk = gitgutter#hunk#in_hunk(lnum)
call add(fold_levels, (in_hunk ? 0 : 2))
endfor
let lines_of_context = 3
for lnum in range(1, line('$'))
if fold_levels[lnum] == 2
let pre = lnum >= 3 ? lnum - lines_of_context : 0
let post = lnum + lines_of_context
if index(fold_levels[pre:post], 0) != -1
let fold_levels[lnum] = 1
endif
endif
endfor
call gitgutter#utility#setbufvar(bufnr(''), 'fold_levels', fold_levels)
endfunction
function! s:save_fold_state()
let bufnr = bufnr('')
call gitgutter#utility#setbufvar(bufnr, 'foldlevel', &foldlevel)
call gitgutter#utility#setbufvar(bufnr, 'foldmethod', &foldmethod)
if &foldmethod ==# 'manual'
mkview
endif
endfunction
function! s:restore_fold_state()
let bufnr = bufnr('')
let &foldlevel = gitgutter#utility#getbufvar(bufnr, 'foldlevel')
let &foldmethod = gitgutter#utility#getbufvar(bufnr, 'foldmethod')
if &foldmethod ==# 'manual'
loadview
else
normal! zx
endif
endfunction
function! s:folded()
return gitgutter#utility#getbufvar(bufnr(''), 'folded')
endfunction

View file

@ -0,0 +1,93 @@
" don't spam the user when Vim is started in Vi compatibility mode
let s:cpo_save = &cpo
set cpo&vim
function! go#auto#template_autocreate()
if !go#config#TemplateAutocreate() || !&modifiable
return
endif
" create new template from scratch
call go#template#create()
endfunction
function! go#auto#echo_go_info()
if !go#config#EchoGoInfo()
return
endif
if !exists('v:completed_item') || empty(v:completed_item)
return
endif
let item = v:completed_item
if !has_key(item, "info")
return
endif
if empty(item.info)
return
endif
redraws! | echo "vim-go: " | echohl Function | echon item.info | echohl None
endfunction
function! go#auto#auto_type_info()
if !go#config#AutoTypeInfo() || !filereadable(expand('%:p'))
return
endif
" GoInfo automatic update
call go#tool#Info(0)
endfunction
function! go#auto#auto_sameids()
if !go#config#AutoSameids() || !filereadable(expand('%:p'))
return
endif
" GoSameId automatic update
call go#guru#SameIds(0)
endfunction
function! go#auto#fmt_autosave()
if !go#config#FmtAutosave() || !filereadable(expand('%:p'))
return
endif
" Go code formatting on save
call go#fmt#Format(-1)
endfunction
function! go#auto#metalinter_autosave()
if !go#config#MetalinterAutosave() || !filereadable(expand('%:p'))
return
endif
" run gometalinter on save
call go#lint#Gometa(0, 1)
endfunction
function! go#auto#modfmt_autosave()
if !go#config#ModFmtAutosave() || !filereadable(expand('%:p'))
return
endif
" go.mod code formatting on save
call go#mod#Format()
endfunction
function! go#auto#asmfmt_autosave()
if !go#config#AsmfmtAutosave() || !filereadable(expand('%:p'))
return
endif
" Go asm formatting on save
call go#asmfmt#Format()
endfunction
" restore Vi compatibility settings
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2 ts=2 et

View file

@ -0,0 +1,16 @@
snippet cont
defmodule ${1:AppName}Web.${2:ControllerName}Controller do
use $1Web, :controller
${3}
end
snippet view
defmodule ${1:AppName}Web.${2:ViewName}View do
use $1Web, :view
end
snippet chan
defmodule ${1:AppName}Web.${2:ChannelName}Channel do
use $1Web, :channel
end