summaryrefslogtreecommitdiff
path: root/ale_linters/fortran
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-04-15 13:35:54 +0100
committerw0rp <devw0rp@gmail.com>2017-04-15 13:36:16 +0100
commit706dd050f2ec570eb12398d42a18f6c4f2bd56df (patch)
tree2c463aa0d5ef02feab3f2ef87215bd4417b47729 /ale_linters/fortran
parent2f009690c3cf442f828830cc1d2fece619f308ff (diff)
downloadale-706dd050f2ec570eb12398d42a18f6c4f2bd56df.zip
Fix #257 in preparation for #427, standardise options with fallbacks, and make it so every value can be computed dynamically
Diffstat (limited to 'ale_linters/fortran')
-rw-r--r--ale_linters/fortran/gcc.vim10
1 files changed, 7 insertions, 3 deletions
diff --git a/ale_linters/fortran/gcc.vim b/ale_linters/fortran/gcc.vim
index 6d3f495c..0f390852 100644
--- a/ale_linters/fortran/gcc.vim
+++ b/ale_linters/fortran/gcc.vim
@@ -52,12 +52,16 @@ function! ale_linters#fortran#gcc#Handle(buffer, lines) abort
return l:output
endfunction
+function! ale_linters#fortran#gcc#GetCommand(buffer) abort
+ return 'gcc -S -x f95 -fsyntax-only -ffree-form '
+ \ . g:ale_fortran_gcc_options
+ \ . ' -'
+endfunction
+
call ale#linter#Define('fortran', {
\ 'name': 'gcc',
\ 'output_stream': 'stderr',
\ 'executable': 'gcc',
-\ 'command': 'gcc -S -x f95 -fsyntax-only -ffree-form '
-\ . g:ale_fortran_gcc_options
-\ . ' -',
+\ 'command_callback': 'ale_linters#fortran#gcc#GetCommand',
\ 'callback': 'ale_linters#fortran#gcc#Handle',
\})