summaryrefslogtreecommitdiff
path: root/doc/ale-cpp.txt
diff options
context:
space:
mode:
authorGagbo <Gagbo@users.noreply.github.com>2017-06-24 13:38:16 +0200
committerw0rp <w0rp@users.noreply.github.com>2017-06-24 12:38:16 +0100
commite98560a349f3381c8fc6ecb6bf149c337dcf17be (patch)
tree7ad98b85b261aa3e085df5e7aaa558687c35955d /doc/ale-cpp.txt
parent026c4f304ee69b81c80f9969c62353546c847c7a (diff)
downloadale-e98560a349f3381c8fc6ecb6bf149c337dcf17be.zip
Added builddir option to clang-tidy to point to json folder (#688)
Detect compille_commands.json files for clang-tidy
Diffstat (limited to 'doc/ale-cpp.txt')
-rw-r--r--doc/ale-cpp.txt35
1 files changed, 34 insertions, 1 deletions
diff --git a/doc/ale-cpp.txt b/doc/ale-cpp.txt
index a64f87b1..27e7fe0b 100644
--- a/doc/ale-cpp.txt
+++ b/doc/ale-cpp.txt
@@ -3,6 +3,37 @@ ALE C++ Integration *ale-cpp-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: `''`
+
+ 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
+ aroung LibTooling (namely clang-tidy here)
+
+-------------------------------------------------------------------------------
clang *ale-cpp-clang*
g:ale_cpp_clang_options *g:ale_cpp_clang_options*
@@ -19,6 +50,9 @@ clangtidy *ale-cpp-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_cpp_clangtidy_checks *g:ale_cpp_clangtidy_checks*
@@ -32,7 +66,6 @@ g:ale_cpp_clangtidy_checks *g:ale_cpp_clangtidy_checks*
the shell. The `-checks` flag can be removed entirely by setting this
option to an empty List.
-
g:ale_cpp_clangtidy_options *g:ale_cpp_clangtidy_options*
*b:ale_cpp_clangtidy_options*
Type: |String|