From e71df80fa1f6f47e5504223eb00e27e4bc2e9c0f Mon Sep 17 00:00:00 2001 From: Eivind Uggedal Date: Thu, 28 Apr 2011 08:48:54 +0200 Subject: [PATCH] Syntax checker for Puppet manifests. --- syntax_checkers/puppet.vim | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 syntax_checkers/puppet.vim diff --git a/syntax_checkers/puppet.vim b/syntax_checkers/puppet.vim new file mode 100644 index 00000000..628f6112 --- /dev/null +++ b/syntax_checkers/puppet.vim @@ -0,0 +1,27 @@ +"============================================================================ +"File: puppet.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Eivind Uggedal +"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("loaded_puppet_syntax_checker") + finish +endif +let loaded_puppet_syntax_checker = 1 + +"bail if the user doesnt have puppet installed +if !executable("puppet") + finish +endif + +function! SyntaxCheckers_puppet_GetLocList() + let makeprg = 'puppet --color=false --parseonly '.shellescape(expand('%')) + let errorformat = 'err: Could not parse for environment %*[a-z]: %m at %f:%l' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction