Add clang-format fixer for C/C++ (#873)

* Add clang-format fixer for C/C++

* Document clang-format options

* Refer ale-cpp-clangformat to ale-c-clangformat
This commit is contained in:
Peter Renström
2017-08-24 23:49:43 +02:00
committed by w0rp
parent 623fdf212c
commit 4bea50b82f
8 changed files with 94 additions and 4 deletions

View File

@@ -59,5 +59,24 @@ g:ale_c_gcc_options *g:ale_c_gcc_options*
This variable can be change to modify flags given to gcc.
===============================================================================
clang-format *ale-c-clangformat*
g:ale_c_clangformat_executable *g:ale_c_clangformat_executable*
*b:ale_c_clangformat_executable*
Type: |String|
Default: `'clang-format'`
This variable can be changed to use a different executable for clang-format.
g:ale_c_clangformat_options *g:ale_c_clangformat_options*
*b:ale_c_clangformat_options*
Type: |String|
Default: `''`
This variable can be change to modify flags given to clang-format.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -189,5 +189,12 @@ g:ale_cpp_gcc_options *g:ale_cpp_gcc_options*
This variable can be changed to modify flags given to gcc.
===============================================================================
clang-format *ale-cpp-clangformat*
See |ale-c-clangformat| for information about the available options.
Note that the C options are also used for C++.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -19,6 +19,7 @@ CONTENTS *ale-contents*
clang...............................|ale-c-clang|
cppcheck............................|ale-c-cppcheck|
gcc.................................|ale-c-gcc|
clang-format........................|ale-c-clangformat|
chef..................................|ale-chef-options|
foodcritic..........................|ale-chef-foodcritic|
cpp...................................|ale-cpp-options|
@@ -28,6 +29,7 @@ CONTENTS *ale-contents*
cppcheck............................|ale-cpp-cppcheck|
cpplint.............................|ale-cpp-cpplint|
gcc.................................|ale-cpp-gcc|
clang-format........................|ale-cpp-clangformat|
css...................................|ale-css-options|
stylelint...........................|ale-css-stylelint|
cmake.................................|ale-cmake-options|
@@ -176,8 +178,8 @@ The following languages and tools are supported.
* Asciidoc: 'proselint'
* Bash: 'shell' (-n flag), 'shellcheck'
* Bourne Shell: 'shell' (-n flag), 'shellcheck'
* C: 'cppcheck', 'gcc', 'clang'
* C++ (filetype cpp): 'clang', 'clangtidy', 'cppcheck', 'cpplint', 'gcc'
* C: 'cppcheck', 'gcc', 'clang', 'clang-format'
* C++ (filetype cpp): 'clang', 'clangtidy', 'cppcheck', 'cpplint', 'gcc', 'clang-format'
* C#: 'mcs'
* Chef: 'foodcritic'
* CMake: 'cmakelint'