All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 ===============================================================================
2 ALE C++ Integration *ale-cpp-options*
4 For basic checking of problems with C++ files, ALE offers the `cc` linter,
5 which runs either `clang++`, or `gcc`. See |ale-cpp-cc|.
8 ===============================================================================
11 The following C options also apply to some C++ linters too.
13 * |g:ale_c_always_make|
14 * |g:ale_c_build_dir_names|
16 * |g:ale_c_parse_makefile|
17 * |g:ale_c_parse_compile_commands|
20 ===============================================================================
21 astyle *ale-cpp-astyle*
23 *ale-options.cpp_astyle_executable*
24 *g:ale_cpp_astyle_executable*
25 *b:ale_cpp_astyle_executable*
27 g:ale_cpp_astyle_executable
31 This variable can be changed to use a different executable for astyle.
33 *ale-options.cpp_astyle_project_options*
34 *g:ale_cpp_astyle_project_options*
35 *b:ale_cpp_astyle_project_options*
36 cpp_astyle_project_options
37 g:ale_cpp_astyle_project_options
41 This variable can be changed to use an option file for project level
42 configurations. Provide only the filename of the option file that should be
43 present at the project's root directory.
45 For example, if .astylrc is specified, the file is searched in the parent
46 directories of the source file's directory.
49 ===============================================================================
54 *ale-options.cpp_cc_executable*
55 *g:ale_cpp_cc_executable*
56 *b:ale_cpp_cc_executable*
58 g:ale_cpp_cc_executable
62 This variable can be changed to use a different executable for a C++ compiler.
64 ALE will try to use `clang++` if Clang is available, otherwise ALE will
65 default to checking C++ code with `gcc`.
67 *ale-options.cpp_cc_options*
68 *g:ale_cpp_cc_options*
69 *b:ale_cpp_cc_options*
73 Default: `'-std=c++14 -Wall'`
75 This variable can be changed to modify flags given to the C++ compiler.
77 *ale-options.cpp_cc_use_header_lang_flag*
78 *g:ale_cpp_cc_use_header_lang_flag*
79 *b:ale_cpp_cc_use_header_lang_flag*
80 cpp_cc_use_header_lang_flag
81 g:ale_cpp_cc_use_header_lang_flag
85 By default, ALE will use `'-x c++-header'` instead of `'-x c++'` for header
86 files when using Clang.
88 This variable can be changed to manually activate or deactivate this flag
91 - When set to `-1`, the default behavior is used, `'-x c++-header'` is used
92 with Clang and `'-x c++'` is used with other compilers.
93 - When set to `0`, the flag is deactivated, `'-x c++'` is always used
94 independently of the compiler.
95 - When set to `1`, the flag is activated, `'-x c++-header'` is always used
96 independently of the compiler.
98 GCC does not support `'-x c++-header'` when using `'-'` as input filename,
99 which is what ALE does. This why, by default, ALE only uses `'-x c++-header'`
102 *ale-options.cpp_cc_header_exts*
103 *g:ale_cpp_cc_header_exts*
104 *b:ale_cpp_cc_header_exts*
106 g:ale_cpp_cc_header_exts
108 Default: `['h', 'hpp']`
110 This variable can be changed to modify the list of extensions of the files
111 considered as header files.
113 This variable is only used when `'-x c++-header'` is used instead of `'-x c++'`,
114 see |g:ale_cpp_cc_use_header_lang_flag|.
117 ===============================================================================
120 *ale-options.cpp_ccls_executable*
121 *g:ale_cpp_ccls_executable*
122 *b:ale_cpp_ccls_executable*
124 g:ale_cpp_ccls_executable
128 This variable can be changed to use a different executable for ccls.
130 *ale-options.cpp_ccls_init_options*
131 *g:ale_cpp_ccls_init_options*
132 *b:ale_cpp_ccls_init_options*
133 cpp_ccls_init_options
134 g:ale_cpp_ccls_init_options
138 This variable can be changed to customize ccls initialization options.
141 let g:ale_cpp_ccls_init_options = {
142 \ 'cacheDirectory': '/tmp/ccls',
143 \ 'cacheFormat': 'binary',
150 Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all
151 available options and explanations.
154 ===============================================================================
155 clangcheck *ale-cpp-clangcheck*
157 `clang-check` will be run only when files are saved to disk, so that
158 `compile_commands.json` files can be used. It is recommended to use this
159 linter in combination with `compile_commands.json` files. Therefore,
160 `clang-check` linter reads the options |g:ale_c_build_dir| and
161 |g:ale_c_build_dir_names|. Also, setting |g:ale_c_build_dir| actually
162 overrides |g:ale_c_build_dir_names|.
165 -------------------------------------------------------------------------------
167 *ale-options.cpp_clangcheck_executable*
168 *g:ale_cpp_clangcheck_executable*
169 *b:ale_cpp_clangcheck_executable*
170 cpp_clangcheck_executable
171 g:ale_cpp_clangcheck_executable
173 Default: `'clang-check'`
175 This variable can be changed to use a different executable for clangcheck.
177 *ale-options.cpp_clangcheck_options*
178 *g:ale_cpp_clangcheck_options*
179 *b:ale_cpp_clangcheck_options*
180 cpp_clangcheck_options
181 g:ale_cpp_clangcheck_options
185 This variable can be changed to modify flags given to clang-check.
187 This variable should not be set to point to build subdirectory with
188 `-p path/to/build` option, as it is handled by the |g:ale_c_build_dir|
192 ===============================================================================
193 clangd *ale-cpp-clangd*
195 *ale-options.cpp_clangd_executable*
196 *g:ale_cpp_clangd_executable*
197 *b:ale_cpp_clangd_executable*
198 cpp_clangd_executable
199 g:ale_cpp_clangd_executable
203 This variable can be changed to use a different executable for clangd.
205 *ale-options.cpp_clangd_options*
206 *g:ale_cpp_clangd_options*
207 *b:ale_cpp_clangd_options*
209 g:ale_cpp_clangd_options
213 This variable can be changed to modify flags given to clangd.
216 ===============================================================================
217 clang-format *ale-cpp-clangformat*
219 See |ale-c-clangformat| for information about the available options.
220 Note that the C options are also used for C++.
223 ===============================================================================
224 clangtidy *ale-cpp-clangtidy*
226 `clang-tidy` will be run only when files are saved to disk, so that
227 `compile_commands.json` files can be used. It is recommended to use this
228 linter in combination with `compile_commands.json` files.
229 Therefore, `clang-tidy` linter reads the options |g:ale_c_build_dir| and
230 |g:ale_c_build_dir_names|. Also, setting |g:ale_c_build_dir| actually
231 overrides |g:ale_c_build_dir_names|.
234 -------------------------------------------------------------------------------
236 *ale-options.cpp_clangtidy_checks*
237 *g:ale_cpp_clangtidy_checks*
238 *b:ale_cpp_clangtidy_checks*
240 g:ale_cpp_clangtidy_checks
244 The checks to enable for clang-tidy with the `-checks` argument.
246 All options will be joined with commas, and escaped appropriately for
247 the shell. The `-checks` flag can be removed entirely by setting this
248 option to an empty List.
250 *ale-options.cpp_clangtidy_executable*
251 *g:ale_cpp_clangtidy_executable*
252 *b:ale_cpp_clangtidy_executable*
253 cpp_clangtidy_executable
254 g:ale_cpp_clangtidy_executable
256 Default: `'clang-tidy'`
258 This variable can be changed to use a different executable for clangtidy.
260 *ale-options.cpp_clangtidy_options*
261 *g:ale_cpp_clangtidy_options*
262 *b:ale_cpp_clangtidy_options*
263 cpp_clangtidy_options
264 g:ale_cpp_clangtidy_options
268 This variable can be changed to modify compiler flags given to clang-tidy.
270 - Setting this variable to a non-empty string,
271 - and working in a buffer where no compilation database is found using
272 |g:ale_c_build_dir_names| or |g:ale_c_build_dir|,
273 will cause the `--` argument to be passed to `clang-tidy`, which will mean
274 that detection of `compile_commands.json` files for compile command
275 databases will be disabled.
276 Only set this option if you want to control compiler flags
277 entirely manually, and no `compile_commands.json` file is in one
278 of the |g:ale_c_build_dir_names| directories of the project tree.
280 *ale-options.cpp_clangtidy_extra_options*
281 *g:ale_cpp_clangtidy_extra_options*
282 *b:ale_cpp_clangtidy_extra_options*
283 cpp_clangtidy_extra_options
284 g:ale_cpp_clangtidy_extra_options
288 This variable can be changed to modify flags given to clang-tidy.
290 *ale-options.cpp_clangtidy_fix_errors*
291 *g:ale_cpp_clangtidy_fix_errors*
292 *b:ale_cpp_clangtidy_fix_errors*
293 cpp_clangtidy_fix_errors
294 g:ale_cpp_clangtidy_fix_errors
298 This variable can be changed to disable the `-fix-errors` option for the
302 ===============================================================================
303 clazy *ale-cpp-clazy*
305 *ale-options.cpp_clazy_executable*
306 *g:ale_cpp_clazy_executable*
307 *b:ale_cpp_clazy_executable*
309 g:ale_cpp_clazy_executable
311 Default: `'clazy-standalone'`
313 This variable can be changed to use a different executable for clazy.
315 *ale-options.cpp_clazy_checks*
316 *g:ale_cpp_clazy_checks*
317 *b:ale_cpp_clazy_checks*
319 g:ale_cpp_clazy_checks
321 Default: `['level1']`
323 The checks to enable for clazy with the `-checks` argument.
325 All options will be joined with commas, and escaped appropriately for
326 the shell. The `-checks` flag can be removed entirely by setting this
327 option to an empty List.
329 *ale-options.cpp_clazy_options*
330 *g:ale_cpp_clazy_options*
331 *b:ale_cpp_clazy_options*
333 g:ale_cpp_clazy_options
337 This variable can be changed to modify flags given to clazy.
340 ===============================================================================
341 cppcheck *ale-cpp-cppcheck*
343 *ale-options.cpp_cppcheck_executable*
344 *g:ale_cpp_cppcheck_executable*
345 *b:ale_cpp_cppcheck_executable*
346 cpp_cppcheck_executable
347 g:ale_cpp_cppcheck_executable
349 Default: `'cppcheck'`
351 This variable can be changed to use a different executable for cppcheck.
353 *ale-options.cpp_cppcheck_options*
354 *g:ale_cpp_cppcheck_options*
355 *b:ale_cpp_cppcheck_options*
357 g:ale_cpp_cppcheck_options
359 Default: `'--enable=style'`
361 This variable can be changed to modify flags given to cppcheck.
364 ===============================================================================
365 cpplint *ale-cpp-cpplint*
367 *ale-options.cpp_cpplint_executable*
368 *g:ale_cpp_cpplint_executable*
369 *b:ale_cpp_cpplint_executable*
370 cpp_cpplint_executable
371 g:ale_cpp_cpplint_executable
375 This variable can be changed to use a different executable for cpplint.
377 *ale-options.cpp_cpplint_options*
378 *g:ale_cpp_cpplint_options*
379 *b:ale_cpp_cpplint_options*
381 g:ale_cpp_cpplint_options
385 This variable can be changed to modify flags given to cpplint.
387 *ale-options.c_cpplint_executable*
388 *g:ale_c_cpplint_executable*
389 *b:ale_c_cpplint_executable*
391 g:ale_c_cpplint_executable
395 This variable can be changed to use a different executable for cpplint.
397 *ale-options.c_cpplint_options*
398 *g:ale_c_cpplint_options*
399 *b:ale_c_cpplint_options*
401 g:ale_c_cpplint_options
405 This variable can be changed to modify flags given to cpplint.
408 ===============================================================================
409 cquery *ale-cpp-cquery*
411 *ale-options.cpp_cquery_executable*
412 *g:ale_cpp_cquery_executable*
413 *b:ale_cpp_cquery_executable*
414 cpp_cquery_executable
415 g:ale_cpp_cquery_executable
419 This variable can be changed to use a different executable for cquery.
421 *ale-options.cpp_cquery_cache_directory*
422 *g:ale_cpp_cquery_cache_directory*
423 *b:ale_cpp_cquery_cache_directory*
424 cpp_cquery_cache_directory
425 g:ale_cpp_cquery_cache_directory
427 Default: `'~/.cache/cquery'`
429 This variable can be changed to decide which directory cquery uses for its
433 ===============================================================================
434 cspell *ale-cpp-cspell*
436 See |ale-cspell-options|
439 ===============================================================================
440 flawfinder *ale-cpp-flawfinder*
442 *ale-options.cpp_flawfinder_executable*
443 *g:ale_cpp_flawfinder_executable*
444 *b:ale_cpp_flawfinder_executable*
445 cpp_flawfinder_executable
446 g:ale_cpp_flawfinder_executable
448 Default: `'flawfinder'`
450 This variable can be changed to use a different executable for flawfinder.
452 *ale-options.cpp_flawfinder_minlevel*
453 *g:ale_cpp_flawfinder_minlevel*
454 *b:ale_cpp_flawfinder_minlevel*
455 cpp_flawfinder_minlevel
456 g:ale_cpp_flawfinder_minlevel
460 This variable can be changed to ignore risks under the given risk threshold.
462 *ale-options.cpp_flawfinder_options*
463 *g:ale_cpp_flawfinder_options*
464 *b:ale-cpp-flawfinder*
465 cpp_flawfinder_options
466 g:ale_cpp_flawfinder_options
470 This variable can be used to pass extra options into the flawfinder command.
473 ===============================================================================
474 uncrustify *ale-cpp-uncrustify*
476 See |ale-c-uncrustify| for information about the available options.
479 ===============================================================================
480 vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: