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

Generate file if missing? #7

Open
benron opened this issue Dec 18, 2017 · 2 comments
Open

Generate file if missing? #7

benron opened this issue Dec 18, 2017 · 2 comments

Comments

@benron
Copy link

benron commented Dec 18, 2017

Hi, wondering if it would be hard or if you've considered adding functionality so that if no associated test file or spec was found, it'd create it for you? Like if I try to switch to the test file for
FooBar.swift but it doesn't exist, it'll create the empty FooBarTests.swift test file.

@takasek
Copy link
Owner

takasek commented Dec 21, 2017

Thanks, it is a pretty great idea!
To introduce the feature, there are some issues...

  • which directory to create FoobarTests.swift
    • with selection dialog?
  • how to import the file to Xcode

Both they are technical challenge for me. I will look into it in a month!

@toshi0383
Copy link
Contributor

how to import the file to Xcode

xcode-project-manager/xcodeproj has a nice and simple API for that purpose.

https://github.com/xcode-project-manager/xcodeproj/blob/0c6ac2c4c5ada36639cf2f3748c904ee757377d0/Sources/xcodeproj/PBXGroup.swift#L139

Maybe I will add that feature to https://github.com/toshi0383/hackscode . Let's see..

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

No branches or pull requests

3 participants