Skip to content

smoeding/puppet-global-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puppet-global-plugin

A GNU global plugin to parse Puppet manifests

Building

Note: This has only be tested on Debian 9 (Stretch)!

You will need autoconf/automake/libtool to build the plugin. Run the following comands in the top level directory:

autoreconf -i -f -I m4
./configure --prefix=/usr
make

This will build the plugin. You can ignore the message about aclocal not being able to find the m4 directory.

Optionally you can now also run the tests:

make check

Then run make install as root to install the plugin:

make install

The configure script used --prefix=/usr and therefore the plugin will be installed in /usr/lib/gtags where GNU global expects the files on Debian.

The installation also creates /usr/lib/gtags/puppet.la. This file is not used on Debian and can be deleted if you care.

Setup

Create the file ~/.globalrc with the following content:

# Configuration file for GNU GLOBAL source code tag system.
#
# Please refer to gtags.conf(5) for details.
#
default:\
    :tc=native:tc=puppet:
native:\
    :tc=gtags:tc=htags:
ctags:\
    :tc=htags:
#---------------------------------------------------------------------
# Configuration for gtags(1)
# See gtags(1).
#---------------------------------------------------------------------
common:\
    :skip=tags,TAGS,gtags.files,*.orig,*.rej,*.bak,*~,#*#,*.swp,*.tmp,*.zip,*.gz,*.bz2,*.xz,*.lzh,*.Z,*.tgz:
#
# Built-in parsers.
#
gtags:\
    :tc=common:\
    :tc=builtin-parser:
#
builtin-parser:\
    :langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php\:.php.php3.phtml:
#
# Puppet
#
puppet|Puppet plugin parser:\
    :tc=common:\
    :langmap=puppet\:.pp:\
    :gtags_parser=puppet\:$libdir/gtags/puppet.so:
#---------------------------------------------------------------------
# Configuration for htags(1)
#---------------------------------------------------------------------
htags:\
    ::

This instructs GNU global to use the plugin for Puppet manifests.

About

A GNU global plugin to parse Puppet manifests

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published