2017-03-28 18:25:44 -04:00
|
|
|
===============================================================================
|
|
|
|
ALE C Integration *ale-c-options*
|
|
|
|
|
|
|
|
|
2017-08-05 09:21:02 -04:00
|
|
|
===============================================================================
|
|
|
|
Global Options
|
|
|
|
|
|
|
|
g:ale_c_build_dir_names *g:ale_c_build_dir_names*
|
|
|
|
*b:ale_c_build_dir_names*
|
|
|
|
|
|
|
|
Type: |List|
|
|
|
|
Default: `['build', 'bin']`
|
|
|
|
|
|
|
|
A list of directory names to be used when searching upwards from cpp
|
|
|
|
files to discover compilation databases with. For directory named `'foo'`,
|
|
|
|
ALE will search for `'foo/compile_commands.json'` in all directories on and above
|
|
|
|
the directory containing the cpp file to find path to compilation database.
|
|
|
|
This feature is useful for the clang tools wrapped around LibTooling (namely
|
|
|
|
here, clang-tidy)
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_c_build_dir *g:ale_c_build_dir*
|
|
|
|
*b:ale_c_build_dir*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
A path to the directory containing the `compile_commands.json` file to use
|
|
|
|
with c-family linters. Usually setting this option to a non-empty string
|
|
|
|
will override the |g:ale_c_build_dir_names| option to impose a compilation
|
|
|
|
database (it can be useful if multiple builds are in multiple build
|
|
|
|
subdirectories in the project tree).
|
|
|
|
This feature is also most useful for the clang tools linters, wrapped
|
2018-03-27 14:24:22 -04:00
|
|
|
around LibTooling (namely clang-tidy here)
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_c_parse_makefile *g:ale_c_parse_makefile*
|
|
|
|
*b:ale_c_parse_makefile*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
If set to `1`, ALE will run `make -n` to automatically determine flags to
|
|
|
|
set for C or C++ compilers. This can make it easier to determine the correct
|
|
|
|
build flags to use for different files.
|
|
|
|
|
2017-08-05 09:21:02 -04:00
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
clang *ale-c-clang*
|
|
|
|
|
2017-07-16 16:37:10 -04:00
|
|
|
g:ale_c_clang_executable *g:ale_c_clang_executable*
|
|
|
|
*b:ale_c_clang_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'clang'`
|
|
|
|
|
|
|
|
This variable can be changed to use a different executable for clang.
|
|
|
|
|
|
|
|
|
2017-03-28 18:25:44 -04:00
|
|
|
g:ale_c_clang_options *g:ale_c_clang_options*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_c_clang_options*
|
2017-03-28 18:25:44 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'-std=c11 -Wall'`
|
|
|
|
|
2017-07-16 16:37:10 -04:00
|
|
|
This variable can be changed to modify flags given to clang.
|
2017-03-28 18:25:44 -04:00
|
|
|
|
|
|
|
|
2017-09-10 14:42:45 -04:00
|
|
|
===============================================================================
|
|
|
|
clang-format *ale-c-clangformat*
|
|
|
|
|
|
|
|
g:ale_c_clangformat_executable *g:ale_c_clangformat_executable*
|
|
|
|
*b:ale_c_clangformat_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'clang-format'`
|
|
|
|
|
|
|
|
This variable can be changed to use a different executable for clang-format.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_c_clangformat_options *g:ale_c_clangformat_options*
|
|
|
|
*b:ale_c_clangformat_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be change to modify flags given to clang-format.
|
|
|
|
|
|
|
|
|
2017-08-05 09:21:02 -04:00
|
|
|
===============================================================================
|
2017-08-06 07:15:02 -04:00
|
|
|
clangtidy *ale-c-clangtidy*
|
2017-08-05 09:21:02 -04:00
|
|
|
|
|
|
|
`clang-tidy` will be run only when files are saved to disk, so that
|
|
|
|
`compile_commands.json` files can be used. It is recommended to use this
|
|
|
|
linter in combination with `compile_commands.json` files.
|
|
|
|
Therefore, `clang-tidy` linter reads the options |g:ale_c_build_dir| and
|
|
|
|
|g:ale_c_build_dir_names|. Also, setting |g:ale_c_build_dir| actually
|
|
|
|
overrides |g:ale_c_build_dir_names|.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_c_clangtidy_checks *g:ale_c_clangtidy_checks*
|
|
|
|
*b:ale_c_clangtidy_checks*
|
|
|
|
Type: |List|
|
|
|
|
Default: `['*']`
|
|
|
|
|
|
|
|
The checks to enable for clang-tidy with the `-checks` argument.
|
|
|
|
|
|
|
|
All options will be joined with commas, and escaped appropriately for
|
|
|
|
the shell. The `-checks` flag can be removed entirely by setting this
|
|
|
|
option to an empty List.
|
|
|
|
|
|
|
|
Not all of clangtidy checks are applicable for C. You should consult the
|
2017-08-06 07:14:09 -04:00
|
|
|
clang documentation for an up-to-date list of compatible checks:
|
|
|
|
http://clang.llvm.org/extra/clang-tidy/checks/list.html
|
2017-08-05 09:21:02 -04:00
|
|
|
|
|
|
|
|
2017-08-06 07:15:02 -04:00
|
|
|
g:ale_c_clangtidy_executable *g:ale_c_clangtidy_executable*
|
|
|
|
*b:ale_c_clangtidy_executable*
|
2017-08-05 09:21:02 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'clang-tidy'`
|
|
|
|
|
|
|
|
This variable can be changed to use a different executable for clangtidy.
|
|
|
|
|
|
|
|
|
2017-08-06 07:15:02 -04:00
|
|
|
g:ale_c_clangtidy_options *g:ale_c_clangtidy_options*
|
|
|
|
*b:ale_c_clangtidy_options*
|
2017-08-05 09:21:02 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to modify flags given to clang-tidy.
|
|
|
|
|
|
|
|
- Setting this variable to a non-empty string,
|
|
|
|
- and working in a buffer where no compilation database is found using
|
|
|
|
|g:ale_c_build_dir_names| or |g:ale_c_build_dir|,
|
|
|
|
will cause the `--` argument to be passed to `clang-tidy`, which will mean
|
|
|
|
that detection of `compile_commands.json` files for compile command
|
|
|
|
databases will be disabled.
|
|
|
|
Only set this option if you want to control compiler flags
|
|
|
|
entirely manually, and no `compile_commands.json` file is in one
|
|
|
|
of the |g:ale_c_build_dir_names| directories of the project tree.
|
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
cppcheck *ale-c-cppcheck*
|
|
|
|
|
2017-07-16 17:11:43 -04:00
|
|
|
g:ale_c_cppcheck_executable *g:ale_c_cppcheck_executable*
|
|
|
|
*b:ale_c_cppcheck_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'cppcheck'`
|
|
|
|
|
|
|
|
This variable can be changed to use a different executable for cppcheck.
|
|
|
|
|
|
|
|
|
2017-03-28 18:25:44 -04:00
|
|
|
g:ale_c_cppcheck_options *g:ale_c_cppcheck_options*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_c_cppcheck_options*
|
2017-03-28 18:25:44 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'--enable=style'`
|
|
|
|
|
|
|
|
This variable can be changed to modify flags given to cppcheck.
|
|
|
|
|
|
|
|
|
2018-02-25 09:11:04 -05:00
|
|
|
===============================================================================
|
|
|
|
flawfinder *ale-c-flawfinder*
|
|
|
|
|
|
|
|
g:ale_c_flawfinder_executable *g:ale_c_flawfinder_executable*
|
2018-02-25 09:31:38 -05:00
|
|
|
*b:ale_c_flawfinder_executable*
|
2018-02-25 09:11:04 -05:00
|
|
|
Type: |String|
|
|
|
|
Default: `'flawfinder'`
|
|
|
|
|
|
|
|
This variable can be changed to use a different executable for flawfinder.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_c_flawfinder_minlevel *g:ale_c_flawfinder_minlevel*
|
|
|
|
*b:ale_c_flawfinder_minlevel*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
This variable can be changed to ignore risks under the given risk threshold.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_c_flawfinder_options *g:ale-c-flawfinder*
|
|
|
|
*b:ale-c-flawfinder*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be used to pass extra options into the flawfinder command.
|
|
|
|
|
2018-03-10 05:44:55 -05:00
|
|
|
g:ale_c_flawfinder_error_severity *g:ale_c_flawfinder_error_severity*
|
|
|
|
*b:ale_c_flawfinder_error_severity*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `6`
|
|
|
|
|
|
|
|
This variable can be changed to set the minimum severity to be treated as an
|
|
|
|
error. This setting also applies to flawfinder for c++.
|
|
|
|
|
2018-02-25 09:11:04 -05:00
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
gcc *ale-c-gcc*
|
|
|
|
|
2017-07-16 17:41:15 -04:00
|
|
|
g:ale_c_gcc_executable *g:ale_c_gcc_executable*
|
|
|
|
*b:ale_c_gcc_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'gcc'`
|
|
|
|
|
|
|
|
This variable can be changed to use a different executable for gcc.
|
|
|
|
|
|
|
|
|
2017-03-28 18:25:44 -04:00
|
|
|
g:ale_c_gcc_options *g:ale_c_gcc_options*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_c_gcc_options*
|
2017-03-28 18:25:44 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'-std=c11 -Wall'`
|
|
|
|
|
|
|
|
This variable can be change to modify flags given to gcc.
|
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|