Namespace based type name matching to given pattern analyzer
For example project click here
- Add package:
dotnet add package NameAnalyzer
- Create a
.nameanalyzer
file near to.csproj
file - Add semicolon separated rules to
.nameanalyzer
file- First path: Namespace regex
- Second path: Type name regex
- Add following to
.csproj
file inside<Project></Project>
node
<ItemGroup>
<AdditionalFiles Include="$(MSBuildProjectDirectory)\.nameanalyzer" />
</ItemGroup>
Note: .nameanalyzer
file name is required but location is not required