New checker cmakelint for CMake.
This commit is contained in:
parent
2cfb29d0a4
commit
6cf4f5ca76
@ -58,15 +58,15 @@ their script to find them.
|
|||||||
|
|
||||||
At the time of this writing, syntastic has checking plugins for ACPI
|
At the time of this writing, syntastic has checking plugins for ACPI
|
||||||
Source Language, ActionScript, Ada, Ansible configurations, API Blueprint,
|
Source Language, ActionScript, Ada, Ansible configurations, API Blueprint,
|
||||||
AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C,
|
AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C, C++,
|
||||||
C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart,
|
C#, Cabal, Chef, CMake, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart,
|
||||||
DocBook, Dockerfile, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata,
|
DocBook, Dockerfile, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata,
|
||||||
GLSL, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON,
|
GLSL, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript,
|
||||||
JSX, Julia, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown,
|
JSON, JSX, Julia, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua,
|
||||||
MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl
|
Markdown, MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl,
|
||||||
POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly
|
Perl POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug
|
||||||
Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG,
|
(formerly Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax
|
||||||
reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
|
NG, reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
|
||||||
Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL,
|
Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL,
|
||||||
Vim help, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80,
|
Vim help, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80,
|
||||||
Zope page templates, and Zsh. See the [manual][checkers] for details about the
|
Zope page templates, and Zsh. See the [manual][checkers] for details about the
|
||||||
|
@ -23,6 +23,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang*
|
|||||||
C++......................................|syntastic-checkers-cpp|
|
C++......................................|syntastic-checkers-cpp|
|
||||||
Cabal....................................|syntastic-checkers-cabal|
|
Cabal....................................|syntastic-checkers-cabal|
|
||||||
Chef.....................................|syntastic-checkers-chef|
|
Chef.....................................|syntastic-checkers-chef|
|
||||||
|
CMake....................................|syntastic-checkers-cmake|
|
||||||
COBOL....................................|syntastic-checkers-cobol|
|
COBOL....................................|syntastic-checkers-cobol|
|
||||||
Coco.....................................|syntastic-checkers-co|
|
Coco.....................................|syntastic-checkers-co|
|
||||||
CoffeeScript.............................|syntastic-checkers-coffee|
|
CoffeeScript.............................|syntastic-checkers-coffee|
|
||||||
@ -1486,6 +1487,34 @@ You probably also need a plugin to set |filetype| for Chef files, such as
|
|||||||
|
|
||||||
https://github.com/dougireton/vim-chef
|
https://github.com/dougireton/vim-chef
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
SYNTAX CHECKERS FOR CMAKE *syntastic-checkers-cmake*
|
||||||
|
|
||||||
|
The following checkers are available for CMake (filetype "cmake"):
|
||||||
|
|
||||||
|
1. cmakelint................|syntastic-cmake-cmakelint|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
1. cmakelint *syntastic-cmake-cmakelint*
|
||||||
|
|
||||||
|
Name: cmakelint
|
||||||
|
Maintainer: LCD 47 <lcd047@gmail.com>
|
||||||
|
|
||||||
|
"cmakelint" is a style checker for "CMake" files (https://cmake.org/).
|
||||||
|
See the project's page at GitHub more information:
|
||||||
|
|
||||||
|
https://github.com/richq/cmake-lint
|
||||||
|
|
||||||
|
Installation~
|
||||||
|
|
||||||
|
Install it with "pip": >
|
||||||
|
pip install cmakelint
|
||||||
|
<
|
||||||
|
Checker options~
|
||||||
|
|
||||||
|
This checker is initialised using the "makeprgBuild()" function and thus it
|
||||||
|
accepts the standard options described at |syntastic-config-makeprg|.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
SYNTAX CHECKERS FOR COBOL *syntastic-checkers-cobol*
|
SYNTAX CHECKERS FOR COBOL *syntastic-checkers-cobol*
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
|||||||
lockvar! g:_SYNTASTIC_START
|
lockvar! g:_SYNTASTIC_START
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:_SYNTASTIC_VERSION = '3.8.0-50'
|
let g:_SYNTASTIC_VERSION = '3.8.0-51'
|
||||||
lockvar g:_SYNTASTIC_VERSION
|
lockvar g:_SYNTASTIC_VERSION
|
||||||
|
|
||||||
" Sanity checks {{{1
|
" Sanity checks {{{1
|
||||||
|
@ -19,6 +19,7 @@ let s:_DEFAULT_CHECKERS = {
|
|||||||
\ 'c': ['gcc'],
|
\ 'c': ['gcc'],
|
||||||
\ 'cabal': ['cabal'],
|
\ 'cabal': ['cabal'],
|
||||||
\ 'chef': ['foodcritic'],
|
\ 'chef': ['foodcritic'],
|
||||||
|
\ 'cmake': ['cmakelint'],
|
||||||
\ 'co': ['coco'],
|
\ 'co': ['coco'],
|
||||||
\ 'cobol': ['cobc'],
|
\ 'cobol': ['cobc'],
|
||||||
\ 'coffee': ['coffee', 'coffeelint'],
|
\ 'coffee': ['coffee', 'coffeelint'],
|
||||||
|
40
syntax_checkers/cmake/cmakelint.vim
Normal file
40
syntax_checkers/cmake/cmakelint.vim
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
"============================================================================
|
||||||
|
"File: cmakelint.vim
|
||||||
|
"Description: Syntax checking plugin for syntastic
|
||||||
|
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||||
|
"License: This program is free software. It comes without any warranty,
|
||||||
|
" to the extent permitted by applicable law. You can redistribute
|
||||||
|
" it and/or modify it under the terms of the Do What The Fuck You
|
||||||
|
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||||
|
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
"
|
||||||
|
"============================================================================
|
||||||
|
|
||||||
|
if exists('g:loaded_syntastic_cmake_cmakelint_checker')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:loaded_syntastic_cmake_cmakelint_checker = 1
|
||||||
|
|
||||||
|
let s:save_cpo = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
function! SyntaxCheckers_cmake_cmakelint_GetLocList() dict
|
||||||
|
let makeprg = self.makeprgBuild({})
|
||||||
|
|
||||||
|
let errorformat = '%f:%l: %m'
|
||||||
|
|
||||||
|
return SyntasticMake({
|
||||||
|
\ 'makeprg': makeprg,
|
||||||
|
\ 'errorformat': errorformat,
|
||||||
|
\ 'subtype': 'Style',
|
||||||
|
\ 'returns': [0, 1] })
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
|
\ 'filetype': 'cmake',
|
||||||
|
\ 'name': 'cmakelint' })
|
||||||
|
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
" vim: set sw=4 sts=4 et fdm=marker:
|
Loading…
Reference in New Issue
Block a user