Skip to content

Standardize on new two-line license header - #6111

Merged
jkotas merged 1 commit into
dotnet:masterfrom
am11:feature/standardize-headers
Sep 3, 2020
Merged

Standardize on new two-line license header#6111
jkotas merged 1 commit into
dotnet:masterfrom
am11:feature/standardize-headers

Conversation

@am11

@am11 am11 commented Sep 3, 2020

Copy link
Copy Markdown
Member

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

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

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

am11 commented Sep 3, 2020

Copy link
Copy Markdown
Member Author

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