StyleBro.Analyzers 0.1.0-alpha.1

This is a prerelease version of StyleBro.Analyzers.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package StyleBro.Analyzers --version 0.1.0-alpha.1
                    
NuGet\Install-Package StyleBro.Analyzers -Version 0.1.0-alpha.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="StyleBro.Analyzers" Version="0.1.0-alpha.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="StyleBro.Analyzers" Version="0.1.0-alpha.1" />
                    
Directory.Packages.props
<PackageReference Include="StyleBro.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 StyleBro.Analyzers --version 0.1.0-alpha.1
                    
#r "nuget: StyleBro.Analyzers, 0.1.0-alpha.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 StyleBro.Analyzers@0.1.0-alpha.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=StyleBro.Analyzers&version=0.1.0-alpha.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=StyleBro.Analyzers&version=0.1.0-alpha.1&prerelease
                    
Install as a Cake Tool

StyleBro

Roslyn analyzers and code fixes that keep C# code tidy. It's a modern alternative to StyleCop, built so that dotnet format fixes everything it reports.

StyleCop writes you a ticket. StyleBro just fixes it. Rule IDs use the BRO prefix.

Principles

  • Every rule has a code fix, and Fix All works. Fixes are written for dotnet format: deterministic, idempotent, and they converge in a single pass. CI checks this with a second dotnet format --verify-no-changes run.
  • Don't duplicate the SDK. If a built-in IDE rule already covers a StyleCop rule, the preset enables that rule instead of shipping a copy.
  • Configurable through .editorconfig, with a recommended preset shipped as a low-priority global config.

Rules

ID Title Replaces Fix
BRO1001 Members should be ordered SA1201-SA1204, SA1214 Yes, with custom Fix All

Usage

<PackageReference Include="StyleBro.Analyzers" Version="0.1.0-alpha.1" PrivateAssets="all" />
dotnet format                      # whitespace + style + analyzers, including StyleBro
dotnet format analyzers --diagnostics BRO1001

To opt out of the preset and configure everything yourself: <StyleBroPreset>none</StyleBroPreset>.

Repository layout

src/StyleBro.Analyzers     netstandard2.0, Microsoft.CodeAnalysis.CSharp only (no Workspaces, RS1038)
src/StyleBro.CodeFixes     netstandard2.0, code fixes + Fix All providers
src/StyleBro.Package       packs both DLLs into analyzers/dotnet/cs + build/ preset
tests/StyleBro.Tests       Microsoft.CodeAnalysis.Testing: diagnostics, single fix, Fix All, idempotence
samples/Messy           dotnet format integration sample (Input -> Expected)
scripts/verify-format.ps1

Developing

dotnet test tests/StyleBro.Tests
pwsh scripts/verify-format.ps1
dotnet pack src/StyleBro.Package -c Release -o artifacts

Roslyn is pinned to 4.8.0 so the package loads in the .NET 8 SDK / VS 17.8 and newer.

Roadmap

  1. BRO1600-series documentation: generate XML doc stubs, <inheritdoc/> on overrides and interface implementations, keep <param> in sync with parameters
  2. StyleCop migration tool: read stylecop.json + rulesets and write equivalent .editorconfig
  3. Layout rules the SDK only has as experimental (blank lines, IDE2000 series)
  4. Baseline support: fail only on new violations in legacy codebases
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.7.0-alpha.1 570 10/13/2026
0.6.0-alpha.1 73 10/12/2026
0.5.0-alpha.1 3,408 10/10/2026
0.4.0-alpha.1 77 10/10/2026
0.3.0-alpha.1 75 10/9/2026
0.2.0-alpha.1 116 10/6/2026
0.1.0-alpha.8 247 10/2/2026
0.1.0-alpha.7 51 10/2/2026
0.1.0-alpha.6 43 10/1/2026
0.1.0-alpha.5 55 10/1/2026
0.1.0-alpha.4 48 10/1/2026
0.1.0-alpha.3 53 9/30/2026
0.1.0-alpha.2 52 9/30/2026
0.1.0-alpha.1 56 9/30/2026