===============================================================================
ALE C Integration                                               *ale-c-options*


===============================================================================
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: `''`

  For programs that can read `compile_commands.json` files, this option can be
  set to the directory containing the file for the project. ALE will try to
  determine the location of `compile_commands.json` automatically, but if your
  file exists in some other directory, you can set this option so ALE will
  know where it is.

  This directory will be searched instead of |g:ale_c_build_dir_names|.


g:ale_c_parse_compile_commands                 *g:ale_c_parse_compile_commands*
                                               *b:ale_c_parse_compile_commands*
  Type: |Number|
  Default: `0`

  If set to `1`, ALE will parse `compile_commands.json` files to automatically
  determine flags for C or C++ compilers. ALE will first search for the
  nearest `compile_commands.json` file, and then look for
  `compile_commands.json` files in the directories for
  |g:ale_c_build_dir_names|.

  If |g:ale_c_parse_makefile| or |b:ale_c_parse_makefile| is set to `1`, the
  output of `make -n` will be preferred over `compile_commands.json` files.


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.


===============================================================================
clang                                                             *ale-c-clang*

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.


g:ale_c_clang_options                                   *g:ale_c_clang_options*
                                                        *b:ale_c_clang_options*
  Type: |String|
  Default: `'-std=c11 -Wall'`

  This variable can be changed to modify flags given to clang.


===============================================================================
clangd                                                           *ale-c-clangd*

g:ale_c_clangd_executable                           *g:ale_c_clangd_executable*
                                                    *b:ale_c_clangd_executable*
  Type: |String|
  Default: `'clangd'`

  This variable can be changed to use a different executable for clangd.


g:ale_c_clangd_options                                 *g:ale_c_clangd_options*
                                                       *b:ale_c_clangd_options*
  Type: |String|
  Default: `''`

  This variable can be changed to modify flags given to clangd.


===============================================================================
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.


===============================================================================
clangtidy                                                     *ale-c-clangtidy*

`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
  clang documentation for an up-to-date list of compatible checks:
  http://clang.llvm.org/extra/clang-tidy/checks/list.html


g:ale_c_clangtidy_executable                     *g:ale_c_clangtidy_executable*
                                                 *b:ale_c_clangtidy_executable*
  Type: |String|
  Default: `'clang-tidy'`

  This variable can be changed to use a different executable for clangtidy.


g:ale_c_clangtidy_options                           *g:ale_c_clangtidy_options*
                                                    *b:ale_c_clangtidy_options*
  Type: |String|
  Default: `''`

  This variable can be changed to modify compiler 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.


g:ale_c_clangtidy_extra_options               *g:ale_c_clangtidy_extra_options*
                                              *b:ale_c_clangtidy_extra_options*
  Type: |String|
  Default: `''`

  This variable can be changed to modify flags given to clang-tidy.


===============================================================================
cppcheck                                                       *ale-c-cppcheck*

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.


g:ale_c_cppcheck_options                             *g:ale_c_cppcheck_options*
                                                     *b:ale_c_cppcheck_options*
  Type: |String|
  Default: `'--enable=style'`

  This variable can be changed to modify flags given to cppcheck.


===============================================================================
cquery                                                           *ale-c-cquery*

g:ale_c_cquery_executable                           *g:ale_c_cquery_executable*
                                                    *b:ale_c_cquery_executable*
  Type: |String|
  Default: `'cquery'`

  This variable can be changed to use a different executable for cquery.


g:ale_cpp_cquery_cache_directory               *g:ale_c_cquery_cache_directory*
                                               *b:ale_c_cquery_cache_directory*
  Type: |String|
  Default: `'~/.cache/cquery'`

  This variable can be changed to decide which directory cquery uses for its
cache.


===============================================================================
flawfinder                                                   *ale-c-flawfinder*

g:ale_c_flawfinder_executable                   *g:ale_c_flawfinder_executable*
                                                *b:ale_c_flawfinder_executable*
  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.

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++.


===============================================================================
gcc                                                                 *ale-c-gcc*

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.


g:ale_c_gcc_options                                       *g:ale_c_gcc_options*
                                                          *b:ale_c_gcc_options*
  Type: |String|
  Default: `'-std=c11 -Wall'`

  This variable can be change to modify flags given to gcc.


===============================================================================
uncrustify                                                   *ale-c-uncrustify*

g:ale_c_uncrustify_executable                   *g:ale_c_uncrustify_executable*
                                                *b:ale_c_uncrustify_executable*
  Type: |String|
  Default: `'uncrustify'`

  This variable can be changed to use a different executable for uncrustify.


g:ale_c_uncrustify_options                         *g:ale_c_uncrustify_options*
                                                   *b:ale_c_uncrustify_options*
  Type: |String|
  Default: `''`

  This variable can be change to modify flags given to uncrustify.


===============================================================================
ccls                                                               *ale-c-ccls*

g:ale_c_ccls_executable                               *g:ale_c_ccls_executable*
                                                      *b:ale_c_ccls_executable*
  Type: |String|
  Default: `'ccls'`

  This variable can be changed to use a different executable for ccls.


g:ale_c_ccls_init_options                           *g:ale_c_ccls_init_options*
                                                    *b:ale_c_ccls_init_options*
  Type: |Dictionary|
  Default: `{}`

  This variable can be changed to customize ccls initialization options.
  Example: >
      {
    \   'cacheDirectory': '/tmp/ccls',
    \   'cacheFormat': 'binary',
    \   'diagnostics': {
    \     'onOpen': 0,
    \     'opChange': 1000,
    \   },
    \ }
<
  Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all
  available options and explanations.


===============================================================================
  vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
