SPDX.CodeAnalysis 1.0.0-alpha.227.ge02bdf10b4

This is a prerelease version of SPDX.CodeAnalysis.
dotnet add package SPDX.CodeAnalysis --version 1.0.0-alpha.227.ge02bdf10b4
                    
NuGet\Install-Package SPDX.CodeAnalysis -Version 1.0.0-alpha.227.ge02bdf10b4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SPDX.CodeAnalysis" Version="1.0.0-alpha.227.ge02bdf10b4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SPDX.CodeAnalysis" Version="1.0.0-alpha.227.ge02bdf10b4" />
                    
Directory.Packages.props
<PackageReference Include="SPDX.CodeAnalysis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SPDX.CodeAnalysis --version 1.0.0-alpha.227.ge02bdf10b4
                    
#r "nuget: SPDX.CodeAnalysis, 1.0.0-alpha.227.ge02bdf10b4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SPDX.CodeAnalysis@1.0.0-alpha.227.ge02bdf10b4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SPDX.CodeAnalysis&version=1.0.0-alpha.227.ge02bdf10b4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SPDX.CodeAnalysis&version=1.0.0-alpha.227.ge02bdf10b4&prerelease
                    
Install as a Cake Tool

License Header Enforcement for OSS Projects

GitHub GitHub Sponsors

This package provides Roslyn code analyzers to enforce specifying headers in .cs files similar to:

// SPDX-FileCopyrightText: Copyright 2025-2028 John Smith
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

or:

// SPDX-FileCopyrightText: Copyright 2025-2028 John Smith
// SPDX-License-Identifier: MIT
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This analyzer does basic checks to ensure that your .cs files:

  1. Contain the SPDX-FileCopyrightText tag
  2. Contain the SPDX-License-Identifier tag
  3. The SPDX-License-Identifier matches sample text from the license

This is just to generate warnings during compile time for ease of maintenance. For more robust validation use REUSE during CI.


NuGet

Nuget


Saying Thanks

If you find these libraries to be useful, please star us on GitHub and consider a sponsorship so we can continue bringing you great free tools like these. It really would make a big difference!

GitHub Sponsors

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.227.ge02bdf10b4 139 9/4/2025
1.0.0-alpha.155 128 9/24/2025