DoNotUseTheGreaterThanSign.Analyzer.Net 0.0.1

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

DoNotUseTheGreaterThanSign.Analyzer.Net

build NuGet

A Roslyn analyzer that flags > and >= (rule LessThanOnly, warning by default) and a code fix that rewrites them as < and <= by swapping the operands.

a > b          // becomes  b < a
a >= b         // becomes  b <= a
5 > x && x > 2 // becomes  2 < x && x < 5

When an && chain compares one variable against constants, the clauses are also ordered from the smallest constant to the largest. Other code is only flipped, never reordered.

Install: dotnet add package DoNotUseTheGreaterThanSign.Analyzer.Net

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.0.1 88 10/6/2026