diff options
author | w0rp <devw0rp@gmail.com> | 2020-08-20 01:46:29 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-08-20 01:49:14 +0100 |
commit | 2b785688ead505dcbc1007374d3dca9914aa247a (patch) | |
tree | 6ca8b42b3eedc17e60931a6d22f61d71e8e142e3 /doc/ale-c.txt | |
parent | 4d42ebc160d7cccd19c37ffe2ccb97752794be37 (diff) | |
download | ale-2b785688ead505dcbc1007374d3dca9914aa247a.zip |
#3299 Merge gcc and clang into a cc linter
Users can easily be confused when they set some options for a C or C++
compiler, and another compiler is run with different options, which
still reports errors. To remedy this, the existing `gcc` and `clang`
linters have been replaced with a `cc` linter that will run either
compiler.
This is a breaking change for ALE v3.0.0.
Diffstat (limited to 'doc/ale-c.txt')
-rw-r--r-- | doc/ale-c.txt | 117 |
1 files changed, 53 insertions, 64 deletions
diff --git a/doc/ale-c.txt b/doc/ale-c.txt index fc0d941a..fe28cf4a 100644 --- a/doc/ale-c.txt +++ b/doc/ale-c.txt @@ -1,6 +1,9 @@ =============================================================================== ALE C Integration *ale-c-options* +For basic checking of problems with C files, ALE offers the `cc` linter, which +runs either `clang`, or `gcc`. See |ale-c-cc|. + =============================================================================== Global Options @@ -11,12 +14,12 @@ 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 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) + 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* @@ -94,22 +97,58 @@ g:ale_c_astyle_project_options *g:ale_c_astyle_project_options* =============================================================================== -clang *ale-c-clang* +cc *ale-c-cc* + *ale-c-gcc* + *ale-c-clang* -g:ale_c_clang_executable *g:ale_c_clang_executable* - *b:ale_c_clang_executable* +g:ale_c_cc_executable *g:ale_c_cc_executable* + *b:ale_c_cc_executable* Type: |String| - Default: `'clang'` + Default: `'<auto>'` + + This variable can be changed to use a different executable for a C compiler. - This variable can be changed to use a different executable for clang. + ALE will try to use `clang` if Clang is available, otherwise ALE will + default to checking C code with `gcc`. -g:ale_c_clang_options *g:ale_c_clang_options* - *b:ale_c_clang_options* +g:ale_c_cc_options *g:ale_c_cc_options* + *b:ale_c_cc_options* Type: |String| Default: `'-std=c11 -Wall'` - This variable can be changed to modify flags given to clang. + This variable can be change to modify flags given to the C compiler. + + +=============================================================================== +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. =============================================================================== @@ -295,25 +334,6 @@ g:ale_c_flawfinder_error_severity *g:ale_c_flawfinder_error_severity* =============================================================================== -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* @@ -333,35 +353,4 @@ g:ale_c_uncrustify_options *g:ale_c_uncrustify_options* =============================================================================== -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: |