Skip to content

Update dotnet-format to .NET Foundation license headers#52808

Merged
MichaelSimons merged 6 commits intomainfrom
copilot/fix-license-headers-dotnet-format
Feb 3, 2026
Merged

Update dotnet-format to .NET Foundation license headers#52808
MichaelSimons merged 6 commits intomainfrom
copilot/fix-license-headers-dotnet-format

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

Migrates dotnet-format source from Microsoft copyright headers to .NET Foundation standard and enables IDE0073 enforcement.

Related to #52808

Changes

License headers - Updated 85 files in src/BuiltInTools/dotnet-format/ and test/dotnet-format.UnitTests/:

-// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the MIT license.  See License.txt in the project root for license information.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.

.editorconfig - Removed dotnet-format paths from IDE0073 exclusion:

-[{src/Microsoft.CodeAnalysis.NetAnalyzers,src/BuiltInTools/dotnet-format,test/dotnet-format.UnitTests}/**.cs]
+[src/Microsoft.CodeAnalysis.NetAnalyzers/**.cs]
 dotnet_diagnostic.IDE0073.severity = none

Whitespace - Fixed non-breaking space character and trailing whitespace surfaced by format enforcement.

Scope

Step 2 only. NetAnalyzers migration (step 3) remains excluded pending future work.

Original prompt

Repo: dotnet/sdk (owner: dotnet)

Please create a pull request that fixes only the second step/checkbox described in issue #52775.

Scope constraints:

  • Implement only the second step from the issue.
  • Do not implement or partially implement the third step (leave it for later).

What to do (second step):

  • Fix the license headers for the dotnet-format code.
  • After license headers are corrected, remove the exclusion in .editorconfig for src/tests that was excluding those test sources (the exclusion was presumably present to avoid license-header enforcement failures).

Acceptance criteria:

  • dotnet-format code under this repository has correct license headers per repo conventions.
  • .editorconfig no longer excludes src/tests for the relevant analyzer/license-header rule(s), while keeping any unrelated exclusions intact.
  • The change set is limited to what’s necessary for the second step; avoid touching unrelated formatting/whitespace and avoid any work related to the third step in the issue.
  • PR should include a clear description referencing issue File license header is not enforced in all source code #52775 and explicitly stating it completes only step 2.

Notes:

  • Determine the repo’s expected license header text/pattern and apply it consistently to applicable dotnet-format source files.
  • Update tests under src/tests as needed so that removing the .editorconfig exclusion does not reintroduce failures, but keep changes minimal.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 3, 2026 17:37
Co-authored-by: MichaelSimons <8290530+MichaelSimons@users.noreply.github.com>
Co-authored-by: MichaelSimons <8290530+MichaelSimons@users.noreply.github.com>
Co-authored-by: MichaelSimons <8290530+MichaelSimons@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix license headers for dotnet-format code and update .editorconfig Update dotnet-format license headers to .NET Foundation standard (issue #52775 step 2) Feb 3, 2026
Copilot AI requested a review from MichaelSimons February 3, 2026 17:47
@MichaelSimons MichaelSimons changed the title Update dotnet-format license headers to .NET Foundation standard (issue #52775 step 2) Update dotnet-format license headers to .NET Foundation standard header Feb 3, 2026
Co-authored-by: MichaelSimons <8290530+MichaelSimons@users.noreply.github.com>
Copilot AI changed the title Update dotnet-format license headers to .NET Foundation standard header Update dotnet-format to .NET Foundation license headers (step 2 of #52775) Feb 3, 2026
@MichaelSimons MichaelSimons requested a review from a team February 3, 2026 17:59
@MichaelSimons MichaelSimons marked this pull request as ready for review February 3, 2026 17:59
@MichaelSimons MichaelSimons requested a review from a team as a code owner February 3, 2026 17:59
@MichaelSimons MichaelSimons requested a review from a team February 3, 2026 18:00
@MichaelSimons MichaelSimons changed the title Update dotnet-format to .NET Foundation license headers (step 2 of #52775) Update dotnet-format to .NET Foundation license headers Feb 3, 2026
@MichaelSimons MichaelSimons merged commit fda8300 into main Feb 3, 2026
25 checks passed
@MichaelSimons MichaelSimons deleted the copilot/fix-license-headers-dotnet-format branch February 3, 2026 23:49
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.

4 participants