Hello
On Mon, 10 Oct 2022 12:04:22 +0200
Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> Hello
>
> On 2022-Oct-07, Yugo NAGATA wrote:
>
> > I found that tag files generated by src/tools/make_ctags
> > doesn't include some keywords, that were field names of node
> > structs, for example norm_select in RestrictInfo. Such fields
> > are defined with pg_node_attr macro that was introduced
> > recently, like:
> >
> > Selectivity norm_selec pg_node_attr(equal_ignore);
> >
> > In this case, pg_node_attr is mistakenly interpreted to be
> > the name of the field. So, I propose to use -I option of ctags
> > to ignore the marco name. Attached is a patch to do it.
>
> I've wondered if there's anybody that uses this script. I suppose if
> you're reporting this problem then it has at least one user, and
> therefore worth fixing.
Yeah, I am a make_ctags user, there may be few users though....
> If we do patch it, how about doing some more invasive surgery and
> bringing it to the XXI century? I think the `find` line is a bit lame:
>
> > # this is outputting the tags into the file 'tags', and appending
> > find `pwd`/ -type f -name '*.[chyl]' -print |
> > - xargs ctags -a -f tags "$FLAGS"
> > + xargs ctags -a -f tags "$FLAGS" -I "$IGNORE_LIST"
>
> especially because it includes everything in tmp_install, which pollutes
> the tag list.
>
> In my own tags script I just call "ctags -R", and I feed cscope with
> these find lines
>
> (find $SRCDIR \( -name tmp_install -prune -o -name tmp_check -prune \) -o \( -name "*.[chly]" -o -iname "*makefile*"
-o-name "*.mk" -o -name "*.in" -o -name "*.sh" -o -name "*.sgml" -o -name "*.sql" -o -name "*.p[lm]" \) -type f -print
;\
> find $BUILDDIR \( -name tmp_install -prune \) -o \( -name \*.h -a -type f \) -print )
Thank you for your comments.
I updated the patch to ignore the code under tmp_install and add
some file types like sql, p[lm], and so on. .sgml or .sh is not
included because they don't seem to be beneficial for ctags.
Regards,
Yugo Nagata
--
Yugo NAGATA <nagata@sraoss.co.jp>