Skip to content

Enforce license header (IDE0073) for C#/VB files#52783

Merged
MichaelSimons merged 1 commit intodotnet:mainfrom
MichaelSimons:enforce-license-header
Feb 3, 2026
Merged

Enforce license header (IDE0073) for C#/VB files#52783
MichaelSimons merged 1 commit intodotnet:mainfrom
MichaelSimons:enforce-license-header

Conversation

@MichaelSimons
Copy link
Member

Related to #52775

  • Enable IDE0073 (FileHeaderMismatch) for all [*.{cs,vb}] files
  • Add exclusions for imported code with different valid headers:
    • src/Microsoft.CodeAnalysis.NetAnalyzers (Roslyn analyzers)
    • src/BuiltInTools/dotnet-format (dotnet-format source)
    • test/dotnet-format.UnitTests (dotnet-format tests)
  • Fix license headers in SDK-owned files
    • Add headers where missing
    • Updated headers where inconsistent

- Enable IDE0073 (FileHeaderMismatch) for all [*.{cs,vb}] files
- Add exclusions for imported code with different valid headers:
  - src/Microsoft.CodeAnalysis.NetAnalyzers (Roslyn analyzers)
  - src/BuiltInTools/dotnet-format (dotnet-format source)
  - test/dotnet-format.UnitTests (dotnet-format tests)
- Fix license headers in SDK-owned files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MichaelSimons MichaelSimons marked this pull request as ready for review February 2, 2026 19:32
@MichaelSimons MichaelSimons requested review from a team as code owners February 2, 2026 19:32
Copilot AI review requested due to automatic review settings February 2, 2026 19:32
@MichaelSimons MichaelSimons requested a review from a team as a code owner February 2, 2026 19:32
@MichaelSimons MichaelSimons requested review from a team and MiYanni and removed request for a team February 2, 2026 19:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Member

@nagilson nagilson left a comment

Choose a reason for hiding this comment

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

Great change - thank you!

@MichaelSimons MichaelSimons merged commit 45c94a7 into dotnet:main Feb 3, 2026
29 of 34 checks passed
@MichaelSimons MichaelSimons deleted the enforce-license-header branch February 3, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants