Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the file_exclude_patterns project setting #237

Open
garthk opened this issue Apr 15, 2014 · 4 comments
Open

Use the file_exclude_patterns project setting #237

garthk opened this issue Apr 15, 2014 · 4 comments

Comments

@garthk
Copy link

garthk commented Apr 15, 2014

Seen on OS X with the latest HomeBrew ctags and the latest CTags.sublime-package from the ST3 package manager:

Building CTags for /Users/garthk/hg/PROJECT: Please be patient
error: An unknown error occured.
Check the console for info.
Exception in thread Thread-23:
Traceback (most recent call last):
  File "X/threading.py", line 639, in _bootstrap_inner
  File "X/threading.py", line 596, in run
  File "ctagsplugin in /Users/garthk/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 118, in run
  File "ctagsplugin in /Users/garthk/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 889, in build_ctags
  File "ctagsplugin in /Users/garthk/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 875, in build_ctags
  File "ctags in /Users/garthk/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 331, in build_ctags
  File "ctags in /Users/garthk/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 365, in resort_ctags
IndexError: list index out of range

It's on a big project. I'm not sure CTags is using the file_exclude_patterns from the sublime-project file.

@garthk
Copy link
Author

garthk commented Apr 15, 2014

ps shows ctags -f .tags -R despite this CTags.sublime-settings in $HOME/Library/Application Support/Sublime Text 3/Packages/User and a matching file_exclude_patterns in my project file:

{
    "file_exclude_patterns": [
        ".tags",
        ".tags_sorted_by_file",
        ".gemtags",
        ".hg",
        ".git",
        "node_modules",
        "doc",
        "dist",
        "vendor"
    ]
}

Adding opts fixes the problem lets CTags rebuild:

    "opts": [
        "--exclude=node_modules",
        "--exclude=vendor",
        "--exclude=dist",
        "--exclude=build",
        "--exclude=.hg",
    ]

@garthk garthk changed the title IndexError: list index out of range IndexError: list index out of range; file_exclude_patterns ignored? Apr 15, 2014
@stephenfin
Copy link
Contributor

Sounds like file_exclude_patterns is being ignored. I'll investigate. Feel free to submit a pull request if you've come up with a fix in the interim however.

@stephenfin stephenfin added the Bug label Apr 26, 2014
@stephenfin
Copy link
Contributor

Actually - we never used file_exclude_patterns. Why did you think this would work? 😮 Would be a good thing to add however.

@stephenfin stephenfin changed the title IndexError: list index out of range; file_exclude_patterns ignored? Use the file_exclude_patterns project setting Apr 27, 2014
@j5shi
Copy link

j5shi commented Oct 19, 2014

+1 for using file_exclude_patterns, here are the reasons:

  1. There is always a project for every file opened in ST, even a temp file, thus file_exclude_patters is always available.
  2. Using the file_exclude_patters could be more compact for configurations, we already have so many configurations with ST, why do we need to configure project file_exclude_patters and then again the Ctags --exclude? They are essentialy the same thing!
  3. The files excluding configuration should be placed with related project setting files rather than being messed up in one Ctags settings - User

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants