-
Notifications
You must be signed in to change notification settings - Fork 268
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
Include copyright notice in new files #116
Comments
As a workaround, I added a Copyright Header.txt file to the root of the repository. All contributors should manually copy this copyright notice to all new files they create, and replace any existing, different copyright notices with this canonical one as they come across them. |
Nice work. Perhaps we can add and link these in the contribution guide? For AppCode I use the following features:
|
The file templates and live templates seem to be of global scope, not project scope. So I could edit the header used for all new objective-C files, but that would affect all the projects I work on, not just Typhoon. I can't find any way to update the header only for the current project. Do you know how to do this? Assuming that file templates are globally scoped, code snippets seem best. I now have a live template called 'typhoon_header' that inserts the correct copyright header. I know this is possible with Xcode as well. I'll add some remarks to the contribution guide, including suggestions as to how to easily insert the canonical copyright notice. |
Yeah I think the file templates are global. . . I also raised a bug about this on the appcode tracker. . (I don’t recall if they enrolled it or explained how to do it). . . . but anyway, the file template links to a filename that you can define. . so what I do now is set up a couple for the various projects, and switch by changing the link. . A bit tedious and not shareable. Jasper Blues On Dec 9, 2013, at 3:38 AM, Robert Gilliam notifications@github.com wrote:
|
Ahh, I see. Very tedious! I'll probably end up manually replacing the notices in all new files using a snippet. I've made some changes to (a fork) of the contribution guide, here: https://github.com/rhgills/Typhoon/wiki/Contribution-guide Notably:
Questions:
As soon as we're all in agreement I'll push these changes to the main wiki. |
P.S. Made some changes to the home page as well, where we now link to the contribution guide. |
I think git attributes can be used to include a predefined header block at the start of the files. I know git attributes are shared in the repository, but the filters go in config, so each contributor will have to modify their local configuration (which is kind of the same problem as with templates). Every file added or commited to the repository will include automatically the copyright (the filter script can also “detect” the standard Xcode header and strip out). I can give it a look if you think is a good idea and see if a proof of concept works. |
That's a great idea! 👍 It's less of a problem with this than with templates because here it is only a one time modification. I look forward to seeing what you come up with! |
+1 on both the edits and the filter |
| Includes Unit Tests, Integration Tests, Code Coverge and API reports installed to Xcode. Hah. That was supposed to mean just the API and coverage reports get generated, while the docs get generated and installed. . . |
Ahh! Got away from you a bit I guess ;) I'll clean that up and merge the changes into the wiki. |
Thanks! :) |
Seems resolved to me, yes? |
👍 |
Both Xcode and AppCode should include Typhoon-specific copyright notices when creating new files.
This might be helpful for Xcode: http://stackoverflow.com/questions/5770126/how-can-i-change-the-copyright-template-in-xcode-4
Not sure if AppCode supports this, although IntelliJ appears to: http://www.jetbrains.com/idea/webhelp/generating-and-updating-copyright-notice.html
The text was updated successfully, but these errors were encountered: