Cvoya.Graph.Model.Analyzers 1.0.0-alpha.20250718.1

This is a prerelease version of Cvoya.Graph.Model.Analyzers.
dotnet add package Cvoya.Graph.Model.Analyzers --version 1.0.0-alpha.20250718.1
                    
NuGet\Install-Package Cvoya.Graph.Model.Analyzers -Version 1.0.0-alpha.20250718.1
                    
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="Cvoya.Graph.Model.Analyzers" Version="1.0.0-alpha.20250718.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cvoya.Graph.Model.Analyzers" Version="1.0.0-alpha.20250718.1" />
                    
Directory.Packages.props
<PackageReference Include="Cvoya.Graph.Model.Analyzers">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 Cvoya.Graph.Model.Analyzers --version 1.0.0-alpha.20250718.1
                    
#r "nuget: Cvoya.Graph.Model.Analyzers, 1.0.0-alpha.20250718.1"
                    
#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 Cvoya.Graph.Model.Analyzers@1.0.0-alpha.20250718.1
                    
#: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=Cvoya.Graph.Model.Analyzers&version=1.0.0-alpha.20250718.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cvoya.Graph.Model.Analyzers&version=1.0.0-alpha.20250718.1&prerelease
                    
Install as a Cake Tool

Cvoya.Graph.Model.Analyzers

NuGet License

Compile-time code analyzers for GraphModel - provides static analysis and validation of your graph entity models to catch issues early in the development cycle.

🚀 Quick Start

dotnet add package Cvoya.Graph.Model.Analyzers

The analyzers are automatically enabled when you build your project. No additional configuration required!

// The analyzers will catch issues like this:
[Node("User")]
public class User : INode
{
    // ❌ GM001: Missing parameterless constructor
    public User(string name) { Name = name; }

    public string Id { get; set; }

    // ❌ GM002: Property must have public getter and setter
    [Property]
    public string Name { get; private set; }

    // ❌ GM004: Invalid property type for node
    [Property]
    public IGraph Graph { get; set; }
}

📦 Analyzer Rules

Rule ID Description Severity
GM001 Missing parameterless constructor Error
GM002 Property must have public accessors Error
GM003 Property cannot be graph interface type Error
GM004 Invalid property type for node Error
GM005 Invalid property type for relationship Error
GM006 Complex type contains graph interface types Error
GM007 Duplicate property attribute label Warning
GM008 Duplicate relationship attribute label Warning
GM009 Duplicate node attribute label Warning
GM010 Circular reference without nullable Warning

🔧 Configuration

You can customize analyzer behavior in your .editorconfig:

# Disable specific rules
dotnet_diagnostic.GM007.severity = none

# Change severity levels
dotnet_diagnostic.GM010.severity = error

# Configure for specific files
[**/Generated/*.cs]
dotnet_diagnostic.GM001.severity = none

📋 Rule Details

GM001: Missing Parameterless Constructor

// ❌ Bad
[Node("User")]
public class User : INode
{
    public User(string name) { /* ... */ }
}

// ✅ Good
[Node("User")]
public class User : INode
{
    public User() { }
    public User(string name) : this() { /* ... */ }
}

GM002: Property Must Have Public Accessors

// ❌ Bad
[Property]
public string Name { get; private set; }

// ✅ Good
[Property]
public string Name { get; set; }

GM003: Property Cannot Be Graph Interface Type

// ❌ Bad
[Property]
public IGraph Graph { get; set; }

[Property]
public INode RelatedNode { get; set; }

// ✅ Good - use relationships instead
public IGraph Graph => /* get from context */;

📚 Documentation

For comprehensive documentation, examples, and best practices:

🌐 Complete Documentation

🤝 Contributing

Contributions are welcome! Please see our Contributing Guide.

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Need help? Check the troubleshooting guide or open an issue.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has 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.20250718.1 70 7/18/2025
1.0.0-alpha.20250718.0 72 7/18/2025
1.0.0-alpha.20250716.4 109 7/16/2025