From: | Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: make_ctags: use -I option to ignore pg_node_attr macro |
Date: | 2022-10-12 09:27:04 |
Message-ID: | 20221012182704.86bf482f2736e2e5d9410ead@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
On Mon, 10 Oct 2022 12:04:22 +0200
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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(at)sraoss(dot)co(dot)jp>
Attachment | Content-Type | Size |
---|---|---|
v2_make_ctags.patch | text/x-diff | 877 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2022-10-12 09:37:17 | Re: slab allocator performance issues |
Previous Message | David Rowley | 2022-10-12 09:19:20 | Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant |