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

Standardize on new two-line license header #6111

Merged
merged 1 commit into from
Sep 3, 2020
Merged

Standardize on new two-line license header #6111

merged 1 commit into from
Sep 3, 2020

Conversation

am11
Copy link
Member

@am11 am11 commented Sep 3, 2020

Similar to dotnet/runtime#41783 for arcade.
cc @jkotas

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit 4873d15 into dotnet:master Sep 3, 2020
@am11 am11 deleted the feature/standardize-headers branch September 3, 2020 20:54
@am11
Copy link
Member Author

am11 commented Sep 3, 2020

Script used for this on macOS bash:

$ git remote add dotnet https://github.com/dotnet/arcade

# delete entire line containing the unwanted license third line in C# code, which are part of the whole repo
$ git ls-files :/*.cs |\
    xargs grep -l "See the LICENSE file in the project root for more information." |\
    xargs sed -i '' '/See the LICENSE file in the project root for more information/d'

# delete part of line containing license third line in rest of the files, which are part of the whole repo
$ git ls-files |\
    xargs grep -l "See the LICENSE file in the project root for more information." |\
    xargs sed -i '' 's/ See the LICENSE file in the project root for more information.//g'

# middle grep is there to avoid autofixing of abnormal file-endings (and errors line `sed: RE error: illegal byte sequence`)

after that it can be verified that there are no files containing the unwanted third line:

$ git grep -l 'See the LICENSE file in the project root for more information'
# or without -l to see the file contents

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

Successfully merging this pull request may close these issues.

2 participants