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

Ensure all files include license headers #168

Closed
krisnova opened this issue Dec 15, 2022 · 2 comments
Closed

Ensure all files include license headers #168

krisnova opened this issue Dec 15, 2022 · 2 comments

Comments

@krisnova
Copy link
Contributor

For legal reasons we need to include the license in every file that we consider "Source Code".

Should we have a CI/CD check for this or any easy make target we can run to check/append files as needed?

@krisnova krisnova changed the title Headers for files Ensure all files include license headers Dec 15, 2022
@dmah42
Copy link
Contributor

dmah42 commented Dec 15, 2022

http://www.apache.org/dev/apply-license.html#copy-per-file

"DO I HAVE TO HAVE A COPY OF THE LICENSE IN EACH SOURCE FILE?

Only one full copy of the license is needed per distribution. See the policy."

I don't think we need to. if you want to that's fine, but Apache specifically doesn't require it (unlike more restrictive licenses).

@future-highway
Copy link
Contributor

future-highway commented Dec 15, 2022

Don't know what the decision is going to be here, but since I have probably forgotten on 98% of the files I created, I went ahead and set clion to include the header on new rust files. Instructions for those interested:

  1. Open Settings
  2. Go to Editor -> File and Code Templates
  3. Change Scheme to Project
  4. In each file type expected to be used (e.g., Rust, Typescript), paste the header in the box.
  5. Hit apply

I feel like there should be a way to add it on auto-format. I'll update if I find it. Nevermind it has been removed from rustfmt: rust-lang/rustfmt#5103

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