forked from github-mirrors/ale
Dhall fixes: use stdin, doc errors (#3868)
* purs-tidy * Dhall fixes: use stdin, docs errors
This commit is contained in:
parent
9264ffda23
commit
a099fe24b2
|
@ -3,12 +3,9 @@
|
||||||
"
|
"
|
||||||
function! ale#fixers#dhall_format#Fix(buffer) abort
|
function! ale#fixers#dhall_format#Fix(buffer) abort
|
||||||
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
||||||
let l:command = l:executable
|
|
||||||
\ . ' format'
|
|
||||||
\ . ' --inplace %t'
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'command': l:command,
|
\ 'command': l:executable
|
||||||
\ 'read_temporary_file': 1,
|
\ . ' format'
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
" Author: toastal <toastal@posteo.net>
|
" Author: toastal <toastal@posteo.net>
|
||||||
" Description: Dhall's package freezing
|
" Description: Dhall’s package freezing
|
||||||
|
|
||||||
call ale#Set('dhall_freeze_options', '')
|
call ale#Set('dhall_freeze_options', '')
|
||||||
|
|
||||||
function! ale#fixers#dhall_freeze#Freeze(buffer) abort
|
function! ale#fixers#dhall_freeze#Freeze(buffer) abort
|
||||||
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
||||||
let l:command = l:executable
|
|
||||||
\ . ' freeze'
|
|
||||||
\ . ale#Pad(ale#Var(a:buffer, 'dhall_freeze_options'))
|
|
||||||
\ . ' --inplace %t'
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'command': l:command,
|
\ 'command': l:executable
|
||||||
\ 'read_temporary_file': 1,
|
\ . ' freeze'
|
||||||
|
\ . ale#Pad(ale#Var(a:buffer, 'dhall_freeze_options'))
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
@ -3,12 +3,9 @@
|
||||||
|
|
||||||
function! ale#fixers#dhall_lint#Fix(buffer) abort
|
function! ale#fixers#dhall_lint#Fix(buffer) abort
|
||||||
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
||||||
let l:command = l:executable
|
|
||||||
\ . ' lint'
|
|
||||||
\ . ' --inplace %t'
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'command': l:command,
|
\ 'command': l:executable
|
||||||
\ 'read_temporary_file': 1,
|
\ . ' lint'
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
@ -6,15 +6,15 @@ g:ale_dhall_executable *g:ale_dhall_executable*
|
||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `'dhall'`
|
Default: `'dhall'`
|
||||||
|
|
||||||
g:ale_dhall_options g:ale_dhall_options
|
g:ale_dhall_options *g:ale_dhall_options*
|
||||||
b:ale_dhall_options
|
*b:ale_dhall_options*
|
||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `''`
|
Default: `''`
|
||||||
|
|
||||||
This variable can be set to pass additional options to the 'dhall` executable.
|
This variable can be set to pass additional options to the 'dhall` executable.
|
||||||
This is shared with `dhall-freeze` and `dhall-lint`.
|
This is shared with `dhall-freeze` and `dhall-lint`.
|
||||||
>
|
>
|
||||||
let g:dhall_options = '--ascii'
|
let g:ale_dhall_options = '--ascii'
|
||||||
<
|
<
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
@ -30,15 +30,15 @@ dhall-freeze *ale-dhall-freeze*
|
||||||
Dhall
|
Dhall
|
||||||
(https://dhall-lang.org/)
|
(https://dhall-lang.org/)
|
||||||
|
|
||||||
g:ale_dhall_freeze_options g:ale_dhall_freeze_options
|
g:ale_dhall_freeze_options *g:ale_dhall_freeze_options*
|
||||||
b:ale_dhall_freeze_options
|
*b:ale_dhall_freeze_options*
|
||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `''`
|
Default: `''`
|
||||||
|
|
||||||
This variable can be set to pass additional options to the 'dhall freeze`
|
This variable can be set to pass additional options to the 'dhall freeze`
|
||||||
executable.
|
executable.
|
||||||
>
|
>
|
||||||
let g:dhall_freeze_options = '--all'
|
let g:ale_dhall_freeze_options = '--all'
|
||||||
<
|
<
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
|
@ -17,8 +17,6 @@ Execute(The dhall-format callback should return the correct options):
|
||||||
AssertFixer
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'command': ale#Escape('odd-dhall')
|
\ 'command': ale#Escape('odd-dhall')
|
||||||
\ . ' --ascii'
|
\ . ' --ascii'
|
||||||
\ . ' format'
|
\ . ' format'
|
||||||
\ . ' --inplace %t',
|
|
||||||
\ 'read_temporary_file': 1,
|
|
||||||
\ }
|
\ }
|
||||||
|
|
|
@ -16,9 +16,7 @@ Execute(The dhall-freeze callback should return the correct options):
|
||||||
AssertFixer
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'command': ale#Escape('odd-dhall')
|
\ 'command': ale#Escape('odd-dhall')
|
||||||
\ . ' --ascii'
|
\ . ' --ascii'
|
||||||
\ . ' freeze'
|
\ . ' freeze'
|
||||||
\ . ' --all'
|
\ . ' --all'
|
||||||
\ . ' --inplace %t',
|
|
||||||
\ 'read_temporary_file': 1,
|
|
||||||
\ }
|
\ }
|
||||||
|
|
|
@ -15,8 +15,6 @@ Execute(The dhall-lint callback should return the correct options):
|
||||||
AssertFixer
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'command': ale#Escape('odd-dhall')
|
\ 'command': ale#Escape('odd-dhall')
|
||||||
\ . ' --ascii'
|
\ . ' --ascii'
|
||||||
\ . ' lint'
|
\ . ' lint'
|
||||||
\ . ' --inplace %t',
|
|
||||||
\ 'read_temporary_file': 1,
|
|
||||||
\ }
|
\ }
|
||||||
|
|
Loading…
Reference in New Issue