devlooped / nugetizer

A simple to understand packing model for authoring NuGet packages
https://clarius.org/nugetizer/
MIT License
258 stars 7 forks source link

Add best-practice analyzers for nuget packaging #334

Closed kzu closed 1 year ago

kzu commented 1 year ago

Provided analyzers:

Diagnostic ID Description
NG0101 The default description set by the .NET SDK ('Package Description') is being used for your package. This will look poorly in the NuGet gallery.
NG0102 The Description property used for the package must be up to 4000 characters long.
NG0103 The PackageIcon project property can specify the path to a JPEG or PNG file to use as the package icon, which will be automatically packed properly.
NG0104 Setting the PackageReadmeFile project property is enough to get the file packed properly.
NG0105 Set the PackageLicenseExpression project property to an accepted value such as 'MIT' or 'Apache-2.0'. See accepted values at https://spdx.org/licenses/.
NG0106 Provide a short description of your package for improved discoverability.
NG0107 Source Link is the recommended way to automatically include this information. Install the relevant NuGet package for your source control provider (such as GitHub, AzureRepos, GitLab, etc.) and NuGetizer will automatically use the provided information.
NG0108 This should be a publicly available url that can be invoked directly by a version control software. Populated automatically when setting the PublishRepositoryUrl project property to 'true' and using SourceLink.
NG0109 Make sure PackageProjectUrl is an actual homepage users can navigate to directly from nuget.org. RepositoryUrl, on the other hand, is intended for version control software.
NG0110 Source Link is the recommended way to automatically include source information with your package. Install the relevant NuGet package for your source control provider (such as GitHub, AzureRepos, GitLab, etc.) and NuGetizer will automatically use the provided information.
NG0111 When EmbedUntrackedSources is set to 'true', Source Link will embed in your PDB the items that participated in the compile, but not are included in source control.