Skip to content

Commit

Permalink
do not index variables
Browse files Browse the repository at this point in the history
In my experience, it just clutters the index, which becomes slower and
makes it harder to use with vim-namespaces, for instance. Tell me if I'm wrong.
  • Loading branch information
greg0ire committed Mar 29, 2014
1 parent fb994cd commit a4f6b2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hooks/php/ctags/update-ctags
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_ctags_command()
--languages=php
--totals=yes
--tag-relative=yes
--PHP-kinds=cfiv
--PHP-kinds=cfi
--exclude="*.js"
--exclude=".svn"
--exclude=".git"
Expand Down
12 changes: 6 additions & 6 deletions tests/php/ctags_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ testTagsFileIsGeneratedOnCommit()
testTagsFileWorksWithSymfony1()
{
git config hooks.php-ctags.project-type symfony1
echo '<?php $indexMe = 42;' > foo.php
echo '<?php class indexMe {};' > foo.php
mkdir cache
echo '<?php $doNotIndexMe = 42;' > cache/bar.php
echo '<?php class doNotIndexMe {};' > cache/bar.php
git add foo.php
git commit --quiet --message "foo file"
sleep 1 # ctags is run in the background. Wait for it.
assertTrue 'The tags file was not generated' "[ -f .git/tags ]"
assertTrue "\$indexMe was not found here : `cat .git/tags`" "grep indexMe .git/tags"
assertFalse '$doNotIndexMe was found' "grep doNotIndexMe .git/tags"
assertTrue "indexMe was not found here : `cat .git/tags`" "grep indexMe .git/tags"
assertFalse 'doNotIndexMe was found' "grep doNotIndexMe .git/tags"
}

testTagsFileWorksWithSymfony2()
{
git config hooks.php-ctags.project-type symfony2
echo '<?php $indexMe = 42;' > foo.php
echo '<?php class indexMe {};' > foo.php
mkdir --parents app/cache
echo '<?php $doNotIndexMe = 42;' > app/cache/bar.php
echo '<?php class doNotIndexMe {};' > app/cache/bar.php
git add foo.php
git commit --quiet --message "foo file"
sleep 1 # ctags is run in the background. Wait for it.
Expand Down

0 comments on commit a4f6b2d

Please sign in to comment.