diff options
author | Jorengarenar <jorengarenar@outlook.com> | 2023-12-07 15:49:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 14:49:37 +0000 |
commit | fc45a935bf25f7daa1965e3afcc8d9c6e525b078 (patch) | |
tree | 744501c6e5f797476ddc7e63b03c9d077b3429e3 /doc/ale-c.txt | |
parent | 1ccd99e113324602b4eca41fd24ba6f991e8f05d (diff) | |
download | ale-fc45a935bf25f7daa1965e3afcc8d9c6e525b078.zip |
Add clang-check linter for C (#4662)
* Close #976 - add clang-check to C linters
* Update docs
Diffstat (limited to 'doc/ale-c.txt')
-rw-r--r-- | doc/ale-c.txt | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/doc/ale-c.txt b/doc/ale-c.txt index d3517e79..b8b448fb 100644 --- a/doc/ale-c.txt +++ b/doc/ale-c.txt @@ -25,10 +25,10 @@ g:ale_c_build_dir_names *g:ale_c_build_dir_names* Type: |List| Default: `['build', 'bin']` - A list of directory names to be used when searching upwards from cpp files + A list of directory names to be used when searching upwards from C 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 + above the directory containing the C file to find path to compilation database. This feature is useful for the clang tools wrapped around LibTooling (namely here, clang-tidy) @@ -203,6 +203,37 @@ g:ale_c_ccls_init_options *g:ale_c_ccls_init_options* =============================================================================== +clangcheck *ale-c-clangcheck* + +`clang-check` 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-check` 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_clangcheck_executable *g:ale_c_clangcheck_executable* + *b:ale_c_clangcheck_executable* + Type: |String| + Default: `'clang-check'` + + This variable can be changed to use a different executable for clangcheck. + + +g:ale_c_clangcheck_options *g:ale_c_clangcheck_options* + *b:ale_c_clangcheck_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clang-check. + + This variable should not be set to point to build subdirectory with + `-p path/to/build` option, as it is handled by the |g:ale_c_build_dir| + option. + + +=============================================================================== clangd *ale-c-clangd* g:ale_c_clangd_executable *g:ale_c_clangd_executable* @@ -378,7 +409,7 @@ g:ale_c_cquery_executable *g:ale_c_cquery_executable* This variable can be changed to use a different executable for cquery. -g:ale_cpp_cquery_cache_directory *g:ale_c_cquery_cache_directory* +g:ale_c_cquery_cache_directory *g:ale_c_cquery_cache_directory* *b:ale_c_cquery_cache_directory* Type: |String| Default: `'~/.cache/cquery'` |