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

License headers in source files is wrong #3837

Closed
sophiajt opened this issue Jun 16, 2019 · 5 comments
Closed

License headers in source files is wrong #3837

sophiajt opened this issue Jun 16, 2019 · 5 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@sophiajt
Copy link
Contributor

  • Package Name:

All

Describe the bug
We currently state the phrase in our code, including auto-generated code:

// Licensed under the MIT License. See License.txt in the project root for license information.

But this is not where the license file is. It's called "LICENSE", and the header comments should be changed to reflect this.

@sophiajt sophiajt added the Client This issue points to a problem in the data-plane of the library. label Jun 16, 2019
sadasant added a commit that referenced this issue Jun 18, 2019
sadasant added a commit that referenced this issue Jun 18, 2019
sadasant added a commit that referenced this issue Jun 18, 2019
@bterlson
Copy link
Member

We have a list of officially blessed copyright headers for various languages here (Microsoft Internal, sorry).

Also, the LICENSE.md file must be included in the package. I'll update the guidelines to be more clear about this.

@sophiajt
Copy link
Contributor Author

Reposting here for those who do not have access:

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

sadasant added a commit that referenced this issue Jun 20, 2019
sadasant added a commit that referenced this issue Jun 20, 2019
* [JS] [KeyVault] Copyright headers

Fixes #3783
Related to #3837
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jul 1, 2020

I believe with latest efforts on enabling the eslint plugin v3 on all our packages, we have the below copyright in the non auto generated files

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

@joheredi Does the code generator have a default copyright text to use or relies on the user to provide one? If it has its own, then we should update it to use the above text

@ramya-rao-a ramya-rao-a added this to the [2020] August milestone Jul 1, 2020
@joheredi
Copy link
Member

joheredi commented Jul 1, 2020

It has a default value if nothing is provided

/*
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */

Autorest also comes with a few canned license headers that users can use by name --license-header=HEADER_NAME, this repo mostly uses MICROSOFT_MIT_NO_VERSION which produces

/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

I can modify MICROSOFT_MIT_NO_VERSION to produce:

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

@ramya-rao-a
Copy link
Contributor

Thanks @joheredi

Logged Azure/autorest.typescript#677

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

4 participants