Fortran: gfortran - novaez/syntastic GitHub Wiki

Maintainer: Karl Yngve Lervåg [email protected]

Checker options:

You can set the buffer local variable b:syntastic_fortran_cflags. If this variable is set for the current buffer no search for additional libraries is done. I.e. set the variable like this:

let b:syntastic_fortran_cflags = '-I/usr/include/libsoup-2.4'

In order to add some custom include directories that should be added to the gfortran command line you can add those to the global variable g:syntastic_fortran_include_dirs. This list can be used like this:

let g:syntastic_fortran_include_dirs = [ 'includes', 'headers' ]

Moreover it is possible to add additional compiler options to the syntax checking execution via the variable g:syntastic_fortran_compiler_options:

let g:syntastic_fortran_compiler_options = '-std=f95'

Additionally the setting g:syntastic_fortran_config_file allows you to define a file that contains additional compiler arguments like include directories or CFLAGS. The file is expected to contain one option per line. If none is given the filename defaults to .syntastic_fortran_config:

let g:syntastic_fortran_config_file = '.config'

Using the global variable g:syntastic_fortran_remove_include_errors you can specify whether errors of files included via the g:syntastic_fortran_include_dirs setting are removed from the result set:

let g:syntastic_fortran_remove_include_errors = 1

Use the variable g:syntastic_fortran_errorformat to override the default error format:

let g:syntastic_fortran_errorformat = '%f:%l: %trror: %m'

Set your compiler executable with e.g. (defaults to gfortran)

let g:syntastic_fortran_compiler = 'gfortran'

Note:

This checker doesn't call the makeprgBuild() function, and thus it ignores the usual g:syntastic_fortran_gfortran_<option> variables. The only exception is g:syntastic_fortran_gfortran_exec, which can still be used to override the checker's executable.

⚠️ **GitHub.com Fallback** ⚠️