mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-25 12:26:51 +08:00
Run actionlint by default on GitHub files
Detect paths containing .github as a directory for running actionlint by default on YAML filetypes.
This commit is contained in:
@@ -5,6 +5,11 @@ call ale#Set('yaml_actionlint_executable', 'actionlint')
|
||||
call ale#Set('yaml_actionlint_options', '')
|
||||
|
||||
function! ale_linters#yaml#actionlint#GetCommand(buffer) abort
|
||||
" Only execute actionlint on YAML files in /.github/ paths.
|
||||
if expand('#' . a:buffer . ':p') !~# '\v[/\\]\.github[/\\]'
|
||||
return ''
|
||||
endif
|
||||
|
||||
let l:options = ale#Var(a:buffer, 'yaml_actionlint_options')
|
||||
|
||||
if l:options !~# '-no-color'
|
||||
|
||||
Reference in New Issue
Block a user