oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.33k stars 746 forks source link

put the ctags language defs into a file instead of lengthy command line #1672

Open tarzanek opened 7 years ago

tarzanek commented 7 years ago

the ctags command line is TOO LONG: https://github.com/OpenGrok/OpenGrok/blob/master/src/org/opensolaris/opengrok/analysis/Ctags.java#L88

we should write this into a file and use the file and --options param of ctags: http://docs.ctags.io/en/latest/optlib.html

vladak commented 7 years ago

This would clash with user configurable options already present in Ctags#initialize():

242              /* Add extra command line options for ctags. */
243              if (CTagsExtraOptionsFile != null) {
244                  LOGGER.log(Level.INFO, "Adding extra options to ctags");
245                  command.add("--options=" + CTagsExtraOptionsFile);
246              }

I.e. the file needs to be generated by merging user config.

tarzanek commented 7 years ago

I was hoping 2 --options can be used ;)

vladak commented 7 years ago

As long as the double option works for both Exuberant and Universal ctags fine with me.

tarzanek commented 7 years ago

(I don't know if 2 --options can be used, I was just joking, anyways, this should be investigated, since I am not sure if all definitions are being used right now)

cross commented 5 years ago

Is there any status on this? Old open bug. I'm trying to track down some warnings I'm getting from ctags, so how these are all specified may come into play...

masatake commented 4 years ago

You can specify multiple option files like: https://github.com/sourcegraph/sourcegraph/tree/df2c4da895f6fb7935e8858f7a87ff403fdd11c1/cmd/symbols/.ctags.d .