I use ALE vim plugin which lints with clang and gcc by default. If I write program on C and define variable of ssize_t
type ALE will marks it as mistake with message "unknown type name 'ssize_t'; did you mean 'size_t'?", regardless of ssize_t
is defined in stdio.h and program is compiled successfully by gcc. I suppose that gcc and clang linters doesn't follow stdio.h and need to be configured. Probably I should set g:ale_c_clang_options
and g:ale_gcc_options
variables in vim. I have tried
let g:ale_c_clang_options = '-std=c11 -Wall -I/usr/include'
let g:ale_linters = {'c': ['clang']}
Result is the same.
UPD: I have changed linters dictionary in .vimrc and error message disappears.
let g:ale_linters = {'c': ['clangtidy']}
But I still don't know how to configure clang and gcc linters proper way.