summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorMarc Delage <geam.creadl@gmail.com>2016-10-08 13:42:36 +0200
committerw0rp <w0rp@users.noreply.github.com>2016-10-08 12:42:36 +0100
commitedc5cedd8ce019d4d06931ec8b449a5179153b71 (patch)
treeee3d3cb2701aa3196573a66ebda7de336fa46ba0 /ale_linters
parentbd6da4489d4e99ba459ae75b2a6ddc942f8a82c7 (diff)
downloadale-edc5cedd8ce019d4d06931ec8b449a5179153b71.zip
Add cpp linter (#64)
* Add c gcc option in the doc * Add missing tag for eslint option in the doc * Correct typo in doc (' ' instead of '.') * add cpp linter * correct typo in doc * add filetype information for c++
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/cpp/gcc.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/ale_linters/cpp/gcc.vim b/ale_linters/cpp/gcc.vim
new file mode 100644
index 00000000..31c3c245
--- /dev/null
+++ b/ale_linters/cpp/gcc.vim
@@ -0,0 +1,23 @@
+" Author: geam <mdelage@student.42.fr>
+" Description: gcc linter for cpp files
+
+if exists('g:loaded_ale_linters_cpp_gcc')
+ finish
+endif
+
+let g:loaded_ale_linters_cpp_gcc = 1
+
+" Set this option to change the GCC options for warnings for C.
+if !exists('g:ale_cpp_gcc_options')
+ let g:ale_cpp_gcc_options = '-Wall'
+endif
+
+call ALEAddLinter('cpp', {
+\ 'name': 'gcc',
+\ 'output_stream': 'stderr',
+\ 'executable': 'gcc',
+\ 'command': 'gcc -S -x c++ -fsyntax-only '
+\ . g:ale_cpp_gcc_options
+\ . ' -',
+\ 'callback': 'ale#handlers#HandleGCCFormat',
+\})