Skip to content

Remove "All Rights Reserved" from copyright notices #1466

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

Merged
merged 2 commits into from
Apr 29, 2021

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Apr 29, 2021

Per Microsoft policy at:
https://docs.opensource.microsoft.com/content/releasing/copyright-headers.html

All copyright notices no longer include "All Rights Reserved" and the comment style has been updated to be consistent with policy.

Resolves #1465

Also double-checked that all *.cs and *.ps1 files have a copyright notice.

Per Microsoft policy at:
https://docs.opensource.microsoft.com/content/releasing/copyright-headers.html

All copyright notices no longer include "All Rights Reserved" and the comment
style has been updated to be consistent with policy.
@andyleejordan
Copy link
Member Author

@rjmholt We should consider adding an automated check for this (and replacing some of our tools/scripts).

@andyleejordan
Copy link
Member Author

I checked with git ls-files | xargs rg --files-without-match "Copyright". Remaining missing copyright headers in this repo (and I think they can be ignored given either the file types or intended use):

tools/PsesLogAnalyzer/PsesLogAnalyzer.format.ps1xml
tools/releaseBuild/FileCatalogSigning.xml
tools/PsesLogAnalyzer/PsesLogAnalyzer.psm1
tools/terms/UserExclusions.xml
tools/terms/FileTypeSet.xml
tools/PsesLogAnalyzer/.vscode/launch.json
test/PowerShellEditorServices.Test/xunit.runner.json
test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj
test/PowerShellEditorServices.Test/Fixtures/Workspace/rootfile.ps1
test/PowerShellEditorServices.Test/Fixtures/Workspace/other/other.pssc
test/PowerShellEditorServices.Test/Fixtures/Workspace/other/other.psrc
test/PowerShellEditorServices.Test/Fixtures/Workspace/other/other.cdxml
test/PowerShellEditorServices.Test/Fixtures/Workspace/nested/nestedmodule.psd1
test/PowerShellEditorServices.Test/Fixtures/Workspace/other/other.ps1xml
test/PowerShellEditorServices.Test/Fixtures/Workspace/nested/nestedmodule.psm1
test/PowerShellEditorServices.Test/Fixtures/Workspace/nested/donotfind.txt
test/PowerShellEditorServices.Test/App.config
test/PowerShellEditorServices.Test.Shared/scriptassets/Bad&name4script.ps1
test/PowerShellEditorServices.Test.Shared/scriptassets/NormalScript.ps1
test/PowerShellEditorServices.Test/Fixtures/Workspace/nested/donotfind.ps1
test/PowerShellEditorServices.Test.Shared/Symbols/NoSymbols.ps1
test/PowerShellEditorServices.Test.Shared/Symbols/PowerShellDataFile.psd1
test/PowerShellEditorServices.Test.Shared/Symbols/PesterFile.tests.ps1
test/PowerShellEditorServices.Test.Shared/SymbolDetails/SymbolDetails.ps1
test/PowerShellEditorServices.Test.Shared/Symbols/MultipleSymbols.ps1
test/PowerShellEditorServices.Test.Shared/References/ReferenceFileE.ps1
test/PowerShellEditorServices.Test.Shared/References/SimpleFile.ps1
test/PowerShellEditorServices.Test.Shared/References/ReferenceFileC.ps1
test/PowerShellEditorServices.Test.Shared/References/ReferenceFileD.ps1
test/PowerShellEditorServices.Test.Shared/References/ReferenceFileB.ps1
test/PowerShellEditorServices.Test.Shared/References/ReferenceFileA.ps1
test/PowerShellEditorServices.Test.Shared/References/FileWithReferences.ps1
test/PowerShellEditorServices.Test.Shared/Profile/ProfileTest.ps1
test/PowerShellEditorServices.Test.Shared/PowerShellEditorServices.Test.Shared.csproj
test/PowerShellEditorServices.Test.Shared/References/DotSources.ps1
test/PowerShellEditorServices.Test.Shared/Profile/Test.PowerShellEditorServices_profile.ps1
test/PowerShellEditorServices.Test.Shared/ParameterHints/ParamHints.ps1
test/PowerShellEditorServices.Test.Shared/Debugging/VariableTest.ps1
test/PowerShellEditorServices.Test.Shared/Debugging/DebugTest.ps1
test/PowerShellEditorServices.Test.Shared/Completion/CompletionExamples.psm1
test/PowerShellEditorServices.Test.E2E/xunit.runner.json
test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj
src/PowerShellEditorServices/PowerShellEditorServices.csproj
src/PowerShellEditorServices/.vscode/launch.json
src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj
src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj
scripts/ReleaseProcess.md
module/docs/Set-ScriptExtent.md
modules.json
module/docs/Register-EditorCommand.md
module/docs/Unregister-EditorCommand.md
module/docs/PowerShellEditorServices.Commands.md
module/docs/Out-CurrentFile.md
module/docs/Test-ScriptExtent.md
module/docs/Join-ScriptExtent.md
module/docs/Get-Token.md
module/docs/ConvertTo-ScriptExtent.md
module/docs/ConvertFrom-ScriptExtent.md
module/docs/Import-EditorCommand.md
module/docs/Find-Ast.md
module/PowerShellEditorServices/Commands/en-US/Strings.psd1
module/PowerShellEditorServices/Commands/PowerShellEditorServices.Commands.types.ps1xml
module/PowerShellEditorServices.VSCode/docs/Write-VSCodeHtmlContentView.md
module/PowerShellEditorServices.VSCode/docs/New-VSCodeHtmlContentView.md
module/PowerShellEditorServices.VSCode/docs/Show-VSCodeHtmlContentView.md
module/PowerShellEditorServices.VSCode/docs/Set-VSCodeHtmlContentView.md
docs/toc.yml
module/PowerShellEditorServices.VSCode/docs/Close-VSCodeHtmlContentView.md
docs/template/styles/style.css
docs/template/styles/main.css
docs/index.md
docs/images/PowerShell_logo.png
docs/guide/introduction.md
docs/images/vsc_editor_command_list.png
docs/guide/using_the_host_process.md
docs/guide/toc.md
docs/images/vsc_command_palette.png
docs/docfx.json
docs/api/index.md
README.md
docs/guide/extensions.md
CONTRIBUTING.md
NuGet.Config
CODE_OF_CONDUCT.md
CHANGELOG.md
.vsts-ci/misc-analysis.yml
.vsts-ci/templates/release-general.yml
.vsts-ci/azure-pipelines-release.yml
.vsts-ci/templates/ci-general.yml
ADOPTERS.md
.vscode/tasks.json
.vsts-ci/azure-pipelines-ci.yml
.vscode/settings.json
.vscode/launch.json
.markdownlint.json
.vscode/extensions.json
.github/workflows/codeql-analysis.yml
.gitignore
.editorconfig
.poshchan/settings.json
.gitattributes
.devcontainer/devcontainer.json
.github/CODEOWNERS
.dependabot/config.yml

@@ -25,7 +21,7 @@ function Add-CopyrightHeaders($basePath)
if ($fileContent.StartsWith($copyrightHeaderString) -eq $false)
{
# Add the copyright header to the file
Set-Content $sourceFile.FullName ($copyrightHeaderString + "`r`n`r`n" + $fileContent)
Set-Content $sourceFile.FullName ($copyrightHeaderString + [Environment]::NewLine + [Environment]::NewLine + $fileContent)
Copy link
Member Author

Choose a reason for hiding this comment

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

Slightly fixed up this script, but it also removes the BOM and adds an empty line to the end of files. We should replace this with existing tooling if available.

@andyleejordan andyleejordan enabled auto-merge (squash) April 29, 2021 00:20
@andyleejordan andyleejordan merged commit 3274c23 into master Apr 29, 2021
@andyleejordan andyleejordan deleted the andschwa/copyright branch April 29, 2021 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove "All Rights Reserved" from copyright notices
2 participants