https://github.com/panoramicdata/panoramicdata.nugetmanagement
Nuget package for the management of nuget packages
https://github.com/panoramicdata/panoramicdata.nugetmanagement
Last synced: 2 months ago
JSON representation
Nuget package for the management of nuget packages
- Host: GitHub
- URL: https://github.com/panoramicdata/panoramicdata.nugetmanagement
- Owner: panoramicdata
- License: mit
- Created: 2026-03-31T17:44:05.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-31T19:51:55.000Z (3 months ago)
- Last Synced: 2026-03-31T20:06:35.302Z (3 months ago)
- Language: C#
- Size: 77.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# PanoramicData.NugetManagement
[](https://app.codacy.com/gh/panoramicdata/PanoramicData.NugetManagement/dashboard)
[](https://www.nuget.org/packages/PanoramicData.NugetManagement)
[](https://opensource.org/licenses/MIT)
Opinionated assessment of NuGet packages in a GitHub organization for best practices compliance.
## Overview
PanoramicData.NugetManagement connects to a GitHub organization, examines each repository, and evaluates it against a comprehensive set of opinionated best practice rules covering:
- **CI/CD** — CI workflow structure, checkout depth, action versions
- **Versioning** — Nerdbank.GitVersioning, global.json SDK pinning
- **Central Package Management** — CPM enabled, no inline versions
- **NuGet Hygiene** — snupkg symbols, GeneratePackageOnBuild, PackageReadmeFile
- **Target Framework** — Latest .NET version
- **Build Quality** — TreatWarningsAsErrors, Nullable, ImplicitUsings
- **Code Quality** — .editorconfig, file-scoped namespaces, Codacy, CodeQL
- **Testing** — Test project existence, xUnit v3, coverlet
- **Serialization** — System.Text.Json preferred over Newtonsoft
- **HTTP Clients** — Refit preferred
- **Licensing** — MIT LICENSE, PackageLicenseExpression, Copyright
- **README & Badges** — Codacy, NuGet, License badges
- **Repository Hygiene** — .gitignore, NeutralResourcesLanguage
- **Project Metadata** — PackageId, RepositoryUrl, Authors, PackageIcon
- **Community Health** — SECURITY.md, CONTRIBUTING.md
- **Dependency Automation** — Dependabot or Renovate
## Installation
```shell
dotnet add package PanoramicData.NugetManagement
```
## Quick Start
```csharp
using Octokit;
using Microsoft.Extensions.Logging;
using PanoramicData.NugetManagement.Models;
using PanoramicData.NugetManagement.Services;
// Create an authenticated GitHub client
var github = new GitHubClient(new ProductHeaderValue("MyApp"))
{
Credentials = new Credentials("your-github-token")
};
// Configure assessment options
var options = new AssessmentOptions
{
OrganizationName = "your-org",
RepositoryOptions = new Dictionary
{
["legacy-repo"] = new() { Exclude = true },
["web-app"] = new() { IsPackable = false }
}
};
// Run the assessment
using var loggerFactory = LoggerFactory.Create(b => b.AddConsole());
var assessor = new OrganizationAssessor(
github,
loggerFactory.CreateLogger(),
loggerFactory.CreateLogger());
var result = await assessor.AssessAsync(options);
// Report results
Console.WriteLine($"Organization: {result.OrganizationName}");
Console.WriteLine($"Repositories: {result.RepositoryCount}");
Console.WriteLine($"Compliant: {result.CompliantCount}");
Console.WriteLine($"Non-compliant: {result.NonCompliantCount}");
foreach (var repo in result.RepositoryAssessments)
{
Console.WriteLine($"\n{repo.RepositoryFullName}: {repo.PassedCount}/{repo.RuleResults.Count} passed");
foreach (var failure in repo.RuleResults.Where(r => !r.Passed))
{
Console.WriteLine($" [{failure.Severity}] {failure.RuleId}: {failure.Message}");
if (failure.Remediation is not null)
{
Console.WriteLine($" Fix: {failure.Remediation}");
}
}
}
```
## Per-Repository Options
```csharp
var repoOptions = new RepoOptions
{
Exclude = false, // Set true to skip entirely
IsPackable = true, // Set false for apps/tools (skips NuGet rules)
EnforceRequiredProperties = true, // Configurable 'required' keyword enforcement
SuppressedRules = ["HTTP-01"] // Suppress specific rules by ID
};
```
## Available Rules
Use `RuleRegistry.Rules` to enumerate all discovered rules at runtime.
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).
## License
MIT — see [LICENSE](LICENSE).