NoCyrillicInCodeAnalyzer 0.1.1

dotnet add package NoCyrillicInCodeAnalyzer --version 0.1.1
                    
NuGet\Install-Package NoCyrillicInCodeAnalyzer -Version 0.1.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="NoCyrillicInCodeAnalyzer" Version="0.1.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="NoCyrillicInCodeAnalyzer" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="NoCyrillicInCodeAnalyzer">
  <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 NoCyrillicInCodeAnalyzer --version 0.1.1
                    
#r "nuget: NoCyrillicInCodeAnalyzer, 0.1.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 NoCyrillicInCodeAnalyzer@0.1.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=NoCyrillicInCodeAnalyzer&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=NoCyrillicInCodeAnalyzer&version=0.1.1
                    
Install as a Cake Tool

NoCyrillicInCodeAnalyzer

This project provides Roslyn analyzers and code fixes to prevent the use of Cyrillic characters in C# code identifiers.
It helps maintain code readability and consistency, especially in multilingual teams.

Rules

Rule ID Description Documentation
NC0001 No Cyrillic characters in type names NC0001
NC0002 No Cyrillic characters in namespace names NC0002
NC0003 No Cyrillic characters in method names NC0003
NC0004 No Cyrillic characters in field names NC0004
NC0005 No Cyrillic characters in property names NC0005
NC0006 No Cyrillic characters in local variable names NC0006
NC0007 No Cyrillic characters in parameter names NC0007
NC0008 No Cyrillic characters in type parameter names NC0008
NC0009 No Cyrillic characters in enum member names NC0009
NC0010 No Cyrillic characters in event names NC0010

Usage

Add this analyzer to your project or as a Visual Studio extension.
When you use Cyrillic characters in identifiers, you will receive a warning and a code fix suggestion.

License

MIT

There are no supported framework assets in this 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
0.1.1 202 8/7/2025
0.1.0 131 8/4/2025

Initial release: detects Cyrillic letters in type names, namespaces, variables, methods, properties, fields, and other identifiers, and offers an automatic code fix.