trawor / XToDo

Xcode plugin to collect and list the `TODO`,`FIXME`,`???`,`!!!!`
http://imi.im/xtodo
1.54k stars 179 forks source link

Allow for deeply nested xcodeproject parsing #16

Open tillt opened 10 years ago

tillt commented 10 years ago

Some projects have the xcodeproject not in their root but in some deeply nested folder (e.g. contrib/osx/). As the source-root of those projects usually is higher up, no TODOs etc. will be located as the current version simply looks into the project-dir and below.

I can see two options; A. Allow for project specific configuration settings that offer freely choosing at which location the source-files reside. B. Parse the project-file itself and gather that information out of that - this however could be pretty involving as the Xcode-specific env-variable SOURCE_ROOT itself wont do. It would also demand parsing nested subprojects.

trawor commented 10 years ago

Thx, for your code and your ideas. I think option B is pretty reasonable, will look into it in the next release.

ahti commented 9 years ago

I think project-specific configuration would be very useful, too. My use-case for that is the following: I develop an app that has all it's business-logic in a separate library, integrated via cocoapods. While developing, I integrate the library as a "development pod", so I can directly edit the files in the same Xcode window.

The files do, however, reside in a folder next to the apps project folder, so XToDo doesn't pick them up by default. I've added $(SRCROOT)/../model-library/ as another path to scan, so XToDo shows me todos from there as well, but that prevents me from using XToDo in any other project without also seeing all todos from the model library.

julian-weinert commented 9 years ago

You really need to parse whats there. For my current client we have a big project which consists of 3 to n GIT repos each with a xcodeproj and a complete functioning build environment (one application, another helper and a plugin, more to come).

To have it more overseeable and for our continuous integration tool Jenkins I created a "parent" project with all the sub projects in it. It has one "Aggregate Build" which is used by Jenkins.

Because of the limitations go GIT, I have this directory structure:

+    Sourcecode
    + Parent
        - Parent.xcodeproj
    +    Application
        - Application\ Code
        - Application.xcodeproj
    +    Helper
        - Helper\ Code
        - Helper.xcodeproj
    +    Plugins
        + Plugin A
            - Plugin A\ Code
            - Plugin A.xcodeproj

This means the XToDo would need to parse the .pbxproj file to check which directories are involved, not only recursive sub-directories.