diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-29 19:24:19 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-29 19:24:27 +0100 |
commit | ac4bac8ea4c5a8d520041ad509e10af454fcfce4 (patch) | |
tree | 87a57a03149b62116b8e1b6fa96117e5e3186626 /doc | |
parent | a7b8cb4fe32b43dbeeadc8cb94f378b4e2112723 (diff) | |
download | ale-ac4bac8ea4c5a8d520041ad509e10af454fcfce4.zip |
Add support for parsing compile_commands.json files for C compilers
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale-c.txt | 29 | ||||
-rw-r--r-- | doc/ale-cpp.txt | 1 |
2 files changed, 23 insertions, 7 deletions
diff --git a/doc/ale-c.txt b/doc/ale-c.txt index cf837e5e..282dcf94 100644 --- a/doc/ale-c.txt +++ b/doc/ale-c.txt @@ -25,13 +25,28 @@ g:ale_c_build_dir *g: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 - around LibTooling (namely clang-tidy here) + 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* diff --git a/doc/ale-cpp.txt b/doc/ale-cpp.txt index 8bd111e4..be7e840c 100644 --- a/doc/ale-cpp.txt +++ b/doc/ale-cpp.txt @@ -10,6 +10,7 @@ The following C options also apply to some C++ linters too. * |g:ale_c_build_dir_names| * |g:ale_c_build_dir| * |g:ale_c_parse_makefile| +* |g:ale_c_parse_compile_commands| =============================================================================== |