Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/91836
Change subject: ctags configuration ...................................................................... ctags configuration ctags let you generates a list of class/site/node/define which can then be used by your texteditor to show up the puppet manifest representation. The configuration for ctags is done in /.ctags and ctags execution is wrapped in a rake task 'tags' as a convenience. Vim supports tags files and you can display the file structure using the tagbar plugin. The ctags configuration comes from: https://github.com/majutsushi/tagbar/wiki#puppet I have added a `--languages=puppet` to restrict it to puppet manifests, we might want to generate tags for python/php whatever script we have in operations/puppet. Change-Id: Ia164addddc48f897c3af092b1c14d80fb505889e --- A .ctags M .gitignore M rakefile 3 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/91836/1 diff --git a/.ctags b/.ctags new file mode 100644 index 0000000..9ba81c7 --- /dev/null +++ b/.ctags @@ -0,0 +1,8 @@ +-h pp +--langdef=puppet +--langmap=puppet:.pp +--languages=puppet +--regex-puppet=/^class[ \t]*([:a-zA-Z0-9_\-]+)[ \t]*/\1/c,class/ +--regex-puppet=/^site[ \t]*([a-zA-Z0-9_\-]+)[ \t]*/\1/s,site/ +--regex-puppet=/^node[ \t]*([a-zA-Z0-9_\-]+)[ \t]*/\1/n,node/ +--regex-puppet=/^define[ \t]*([:a-zA-Z0-9_\-]+)[ \t]*/\1/d,definition/ diff --git a/.gitignore b/.gitignore index d34eff6..beb6cdb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ # Automatically generated documentation: /doc/* !/doc/README + +# ctags generated file (see `rake tags`) +/tags diff --git a/rakefile b/rakefile index f0d3277..40b67a3 100644 --- a/rakefile +++ b/rakefile @@ -217,6 +217,16 @@ end end +desc "Generates ctags" +task :tags do + puts "Generating ctags file.." + system('ctags -R .') + puts "Done" + puts + puts "See https://github.com/majutsushi/tagbar/wiki#puppet for vim" + puts "integration with the vim tagbar plugin." +end + # Wrapper to run rspec in a module def run_module_spec(module_name) -- To view, visit https://gerrit.wikimedia.org/r/91836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia164addddc48f897c3af092b1c14d80fb505889e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
