[Scons-users] ctags usage with an scons project

Mats Wichmann mats at wichmann.us
Tue Aug 29 11:27:07 EDT 2017


Completely off the wall, has anyone had luck teaching ctags how to
understand some of the name assignment things that happen in scons?
It's easy enough to get it to pick up SConstruct and SConscript files:

--langmap=Python:+(SConscript),Python:+(SConstruct)

but it ends up missing things like locally defined builders, because
they could look like this:

builder = Builder(action = whatever, ...)
env.Append(BUILDERS = {"Mybuilder" : builder})

now Mybuilder can be invoked in the scripts, but there won't be any tag
for it, which actually might be a useful thing.

Here's another case:

def __myfunc(env, args):
   ...

env.AddMethod(__somefunc, MyFunc)

it can't see that as a function definition either (__myfunc will be, but
there won't be any references to __myfunc except the AddMethod which
usually immediately follows it)

it may just not be something ctags can be twisted into handling, but
thought I'd ask.


More information about the Scons-users mailing list