ArchRoslyn.Analyzers
0.1.1
See the version list below for details.
dotnet add package ArchRoslyn.Analyzers --version 0.1.1
NuGet\Install-Package ArchRoslyn.Analyzers -Version 0.1.1
<PackageReference Include="ArchRoslyn.Analyzers" Version="0.1.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ArchRoslyn.Analyzers --version 0.1.1
#r "nuget: ArchRoslyn.Analyzers, 0.1.1"
// Install ArchRoslyn.Analyzers as a Cake Addin #addin nuget:?package=ArchRoslyn.Analyzers&version=0.1.1 // Install ArchRoslyn.Analyzers as a Cake Tool #tool nuget:?package=ArchRoslyn.Analyzers&version=0.1.1
Roslyn Architecture Analyzer
The ultimate goal of this project is to augment Roslyn C# compiler with additional architecture-related rules. Unlike the more common unit-test based approach, I envision this analyzers to be a part of the main compilation process, with near-instant feedback for developer. These rules should be:
- Fast
- Portable
- Configurable by the end-user
Right now project consists of only one simple analyzer, inspired by an InternalsVisibleTo attribute. If you need more advanced capabilities, you should check out ArchUnitNET or NetArchTest.
CannotBeReferencedBy attribute
This is an assembly attribute that takes one string argument with a name of an assembly and forbids direct and transitive references from the specified assembly to the assembly marked with this attribute. Basically, this attribute is an antipode of InternalsVisibleTo attribute.
Usage instructions
Install ArchRoslyn.Abstractions package in order to mark assemblies with this attribute. Install ArchRoslyn.Analyzer into your projects to enable validation of rules imposed by an attribute.
List of ideas
- Explore unit-testing lib APIs for inspiration and possible adoption as an interface for Roslyn-based rules.
- How to expand CannotBeReferencedBy attributes to allow more generic configuration? - e.g. layers, folders, wildcards, etc.
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.