Dhall fixes: use stdin, doc errors (#3868)

* purs-tidy

* Dhall fixes: use stdin, docs errors
This commit is contained in:
toastal 2021-08-09 11:43:50 +00:00 committed by GitHub
parent 9264ffda23
commit a099fe24b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 37 deletions

View File

@ -3,12 +3,9 @@
"
function! ale#fixers#dhall_format#Fix(buffer) abort
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
let l:command = l:executable
\ . ' format'
\ . ' --inplace %t'
return {
\ 'command': l:command,
\ 'read_temporary_file': 1,
\ 'command': l:executable
\ . ' format'
\}
endfunction

View File

@ -1,18 +1,14 @@
" Author: toastal <toastal@posteo.net>
" Description: Dhall's package freezing
" Description: Dhalls package freezing
call ale#Set('dhall_freeze_options', '')
function! ale#fixers#dhall_freeze#Freeze(buffer) abort
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 {
\ 'command': l:command,
\ 'read_temporary_file': 1,
\ 'command': l:executable
\ . ' freeze'
\ . ale#Pad(ale#Var(a:buffer, 'dhall_freeze_options'))
\}
endfunction

View File

@ -3,12 +3,9 @@
function! ale#fixers#dhall_lint#Fix(buffer) abort
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
let l:command = l:executable
\ . ' lint'
\ . ' --inplace %t'
return {
\ 'command': l:command,
\ 'read_temporary_file': 1,
\ 'command': l:executable
\ . ' lint'
\}
endfunction

View File

@ -6,15 +6,15 @@ g:ale_dhall_executable *g:ale_dhall_executable*
Type: |String|
Default: `'dhall'`
g:ale_dhall_options g:ale_dhall_options
b:ale_dhall_options
g:ale_dhall_options *g:ale_dhall_options*
*b:ale_dhall_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the 'dhall` executable.
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
(https://dhall-lang.org/)
g:ale_dhall_freeze_options g:ale_dhall_freeze_options
b:ale_dhall_freeze_options
g:ale_dhall_freeze_options *g:ale_dhall_freeze_options*
*b:ale_dhall_freeze_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the 'dhall freeze`
executable.
>
let g:dhall_freeze_options = '--all'
let g:ale_dhall_freeze_options = '--all'
<
===============================================================================

View File

@ -17,8 +17,6 @@ Execute(The dhall-format callback should return the correct options):
AssertFixer
\ {
\ 'command': ale#Escape('odd-dhall')
\ . ' --ascii'
\ . ' format'
\ . ' --inplace %t',
\ 'read_temporary_file': 1,
\ . ' --ascii'
\ . ' format'
\ }

View File

@ -16,9 +16,7 @@ Execute(The dhall-freeze callback should return the correct options):
AssertFixer
\ {
\ 'command': ale#Escape('odd-dhall')
\ . ' --ascii'
\ . ' freeze'
\ . ' --all'
\ . ' --inplace %t',
\ 'read_temporary_file': 1,
\ . ' --ascii'
\ . ' freeze'
\ . ' --all'
\ }

View File

@ -15,8 +15,6 @@ Execute(The dhall-lint callback should return the correct options):
AssertFixer
\ {
\ 'command': ale#Escape('odd-dhall')
\ . ' --ascii'
\ . ' lint'
\ . ' --inplace %t',
\ 'read_temporary_file': 1,
\ . ' --ascii'
\ . ' lint'
\ }