Closed Kimilhee closed 9 years ago
I guess it has something to do with your tag rule files which duplicate the same rules. You should check that.
I didn't change anything in the packages/atom-ctags/lib/.ctags file. Is there any possibility to read another .ctags file?
my .ctags file's content is like this.
--langdef=CoffeeScript --langmap=CoffeeScript:.coffee --regex-CoffeeScript=/^[ \t](@?[a-zA-Z$.0-9]+)[ \t](=|:)[ \t]((.))?[ \t](-|=)>/\1/f,function/ --regex-CoffeeScript=/^[ \t]_([a-zA-Z$0-9]+::[a-zA-Z$.0-9]+)[ \t](=|:)[ \t]((.))?[ \t](-|=)>/\1/f,function/ --regex-CoffeeScript=/^[ \t]describe[ \t]"(.+)"[ \t],[ \t]+[-=]>/\1/f,function/ --regex-CoffeeScript=/^[ \t]describe[ \t]'(.+)'[ \t],[ \t]+[-=]>/\1/f,function/ --regex-CoffeeScript=/^[ \t]it[ \t]"([^"]+)"[ \t],[ \t]+[-=]>/\1/f,function/ --regex-CoffeeScript=/^[ \t]it[ \t]'([^']+)'[ \t],[ \t]+[-=]>/\1/f,function/ --regex-CoffeeScript=/^[ \t]f+describe[ \t]"(.+)"[ \t],[ \t]+[-=]>/focused: \1/f,function/ --regex-CoffeeScript=/^[ \t]f+describe[ \t]'(.+)'[ \t],[ \t]+[-=]>/focused: \1/f,function/ --regex-CoffeeScript=/^[ \t]f+it[ \t]"([^"]+)"[ \t],[ \t]+[-=]>/focused: \1/f,function/ --regex-CoffeeScript=/^[ \t]f+it[ \t]'([^']+)'[ \t],[ \t]+[-=]>/focused: \1/f,function/ --regex-CoffeeScript=/^[ \t]xdescribe[ \t]"(.+)"[ \t],[ \t]+[-=]>/disabled: \1/f,function/ --regex-CoffeeScript=/^[ \t]xdescribe[ \t]'(.+)'[ \t],[ \t]+[-=]>/disabled: \1/f,function/ --regex-CoffeeScript=/^[ \t]xit[ \t]"([^"]+)"[ \t],[ \t]+[-=]>/disabled: \1/f,function/ --regex-CoffeeScript=/^[ \t]xit[ \t]'([^']+)'[ \t],[ \t]+[-=]>/disabled: \1/f,function/ --regex-CoffeeScript=/^[ \t]class[ \t]([a-zA-Z$_.0-9]+)[ \t]*/\1/f,function/
--langdef=Css --langmap=Css:.css --langmap=Css:+.less --langmap=Css:+.scss --regex-Css=/^[ \t](.+)[ \t]{/\1/f,function/ --regex-Css=/^[ \t](.+)[ \t],[ \t]$/\1/f,function/ --regex-Css=/^[ \t]@$[ \t]*:/\1/f,function/
--langdef=Sass --langmap=Sass:.sass --regex-Sass=/^[ \t]([#.][a-zA-Z_0-9]+)[ \t]*$/\1/f,function/
--langdef=Yaml --langmap=Yaml:.yaml --langmap=Yaml:+.yml --regex-Yaml=/^[ \t]_([a-zA-Z0-9 ]+)[ \t]:[ \t]*/\1/f,function/
--regex-Html=/^[ \t]<([a-zA-Z]+)[ \t].*>/\1/f,function/
--langdef=Markdown --langmap=Markdown:.md --langmap=Markdown:+.markdown --langmap=Markdown:+.mdown --langmap=Markdown:+.mkd --langmap=Markdown:+.mkdown --langmap=Markdown:+.ron --regex-Markdown=/^#+[ \t]*([^#]+)/\1/f,function/
--langdef=Json --langmap=Json:.json --regex-Json=/^[ \t]"([^"]+)"[ \t]:/\1/f,function/
--langdef=Cson --langmap=Cson:.cson --langmap=Cson:+.gyp --regex-Cson=/^[ \t]'([^']+)'[ \t]:/\1/f,function/ --regex-Cson=/^[ \t]"([^"]+)"[ \t]:/\1/f,function/ --regex-Cson=/^[ \t]([^'"]+)[ \t]:/\1/f,function/
--langmap=C++:+.mm
--langmap=Ruby:+(Rakefile)
--langmap=Php:+.module
--langdef=Go --langmap=Go:.go --regex-Go=/func([ \t]+([^)]+))?[ \t]+([a-zA-Z0-9]+)/\2/f,func/ --regex-Go=/var[ \t]+([a-zA-Z][a-zA-Z0-9])/\1/v,var/ --regex-Go=/type[ \t]+([a-zA-Z][a-zA-Z0-9]_)/\1/t,type/
--langmap=perl:+.pod --regex-perl=/with[ \t]+([^;]+)[ \t]?;/\1/w,role,roles/ --regex-perl=/extends[ \t]+'"['"][ \t]?;/\1/e,extends/ --regex-perl=/use[ \t]+base[ \t]+'"['"][ \t]?;/\1/e,extends/ --regex-perl=/use[ \t]+parent[ \t]+'"['"][ \t]?;/\1/e,extends/ --regex-perl=/Mojo::Base[ \t]+'"['"][ \t]?;/\1/e,extends/ --regex-perl=/^[ \t]?use[ \t]+([^;]+)[ \t]?;/\1/u,use,uses/ --regex-perl=/^[ \t]?require[ \t]+((\w|:)+)/\1/r,require,requires/ --regex-perl=/^[ \t]?has[ \t]+['"]?(\w+)['"]?/\1/a,attribute,attributes/ --regex-perl=/^[ \t]?(\w+)[ \t]?=/\1/a,alias,aliases/ --regex-perl=/->helper([ \t]?['"]?(\w+)['"]?/\1/h,helper,helpers/ --regex-perl=/^[ \t]?our[ \t]?\$@%/\1/o,our,ours/ --regex-perl=/^\=head1[ \t]+(.+)/\1/p,pod,Plain Old Documentation/ --regex-perl=/^\=head2[ \t]+(.+)/-- \1/p,pod,Plain Old Documentation/ --regex-perl=/^\=head[3-5][ \t]+(.+)/---- \1/p,pod,Plain Old Documentation/
--regex-JavaScript=/(,|(;|^)[ \t](var|let|([A-Za-z$][A-Za-z0-9$.].)))[ \t]([A-Za-z0-9$]+)[ \t]=[ \t]function[ \t](/\5/,function/ --regex-JavaScript=/function[ \t]+([A-Za-z0-9$]+)[ \t]([^)])/\1/,function/ --regex-JavaScript=/(,|^|_\/)[ \t]([A-Za-z$][A-Za-z0-9$]+)[ \t]_:[ \t]function[ \t](/\2/,function/ --regex-JavaScript=/(,|^|\/)[ \t](while|if|for|function|([A-Za-z$][A-Za-z0-9$]+))[ \t]([^)])[ \t]{/\3/,function/ --regex-JavaScript=/(,|^|\/)[ \t]get[ \t]+([A-Za-z$][A-Za-z0-9$]+)[ \t]([ \t])[ \t]{/get \2/,function/ --regex-JavaScript=/(,|^|\/)[ \t]set[ \t]+([A-Za-z$][A-Za-z0-9$]+)[ \t]([ \t]([A-Za-z$][A-Za-z0-9$]+)?[ \t])[ \t]{/set \2/,function/
--langdef=haxe --langmap=haxe:.hx --regex-haxe=/^package[ \t]+([A-Za-z0-9.]+)/\1/p,package/ --regex-haxe=/^[ \t][(@:macro|private|public|static|override|inline|dynamic)( \t)]function[ \t]+([A-Za-z0-9]+)/\1/f,function/ --regex-haxe=/^[ \t]([private|public|static|protected|inline][ \t])+var[ \t]+([A-Za-z0-9_]+)/\2/v,variable/ --regex-haxe=/^[ \t]package[ \t]([A-Za-z0-9]+)/\1/p,package/ --regex-haxe=/^[ \t](extern[ \t]|@:native([^)])[ \t]_)class[ \t]+([A-Za-z0-9]+)[ \t][^{]/\2/c,class/ --regex-haxe=/^[ \t](extern[ \t]+)?interface[ \t]+([A-Za-z0-9]+)/\2/i,interface/ --regex-haxe=/^[ \t]typedef[ \t]+([A-Za-z0-9]+)/\1/t,typedef/ --regex-haxe=/^[ \t]enum[ \t]+([A-Za-z0-9]+)/\1/t,typedef/ --regex-haxe=/^[ \t]+([A-Za-z0-9]+)(;|([^)]_:[^)]*))/\1/t,enum_field/
--exclude=*.min.js --exclude=.git --exclude=node_modules --exclude=vendors
check if .ctags exist in your $HOME
/ctags.cnf (on MSDOS, MSWindows only)
/etc/ctags.conf
/usr/local/etc/ctags.conf
$HOME/.ctags
$HOME/ctags.cnf (on MSDOS, MSWindows only)
.ctags
ctags.cnf (on MSDOS, MSWindows only)
If any of these configuration files exist, each will be expected to contain a set of default options which are read in the order listed when ctags starts, but before the CTAGS environment variable is read or any command line options are read. This makes it possible to set up site-wide, personal or project-level defaults. It is possible to compile ctags to read an additional configuration file before any of those shown above, which will be indicated if the output produced by the −−version option lists the "custom-conf" feature. Options appearing in the CTAGS environment variable or on the command line will override options specified in these files. Only options will be read from these files. Note that the option files are read in line-oriented mode in which spaces are significant (since shell quoting is not possible). Each line of the file is read as one command line parameter (as if it were quoted with single quotes). Therefore, use new lines to indicate separate command-line arguments.
tags
The default tag file created by ctags.
TAGS
The default tag file created by etags.
Thank you for your comment.
But I finally found the reason for the duplicate definition of the symbols. It's in the second line of the javascript rule in the .ctags file.
--regex-JavaScript=/function[ \t]+([A-Za-z0-9_$]+) \t])/\1/,function/
When I removed the line and the duplicate definition disappeared!
Thank you.
The fix works for me too, thanks.
@yongkangchen: Was this fixed in a subsequent release then? I checked but did not see one, and this - to my knowledge, appears to be an error in the shipping configuration file. To be clear, the proposed fix also fixed it for me, and I didn't see any other updates.
+1 The problem is still there.
I use OSX 10.10.4 and Atom 1.0.5 and atom-ctags 4.1.4.
atom-ctags makes .tags file like the following exactly the same duplicate symbols.
makeIndex2 /Users/kimilhee/Dev/napoli/bacon/indexing/make-auto-comp-data.js /^function makeIndex2(areas, nonAreas) {$/;" function line:123 makeIndex2 /Users/kimilhee/Dev/napoli/bacon/indexing/make-auto-comp-data.js /^function makeIndex2(areas, nonAreas) {$/;" function line:123
So, when I try to jump to the function atom-ctags shows two symbol options instead jumping right away. I want to jump right away when there is only one function.
And there are another issue. atom-ctags makes another .tags1 file which contains duplicate symbols too.
Please fix this issue. Thank you.