StyleBro.Analyzers
0.1.0-alpha.1
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
<PackageReference Include="StyleBro.Analyzers" Version="0.1.0-alpha.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="StyleBro.Analyzers" Version="0.1.0-alpha.1" />
<PackageReference Include="StyleBro.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add StyleBro.Analyzers --version 0.1.0-alpha.1
#r "nuget: StyleBro.Analyzers, 0.1.0-alpha.1"
#:package StyleBro.Analyzers@0.1.0-alpha.1
#addin nuget:?package=StyleBro.Analyzers&version=0.1.0-alpha.1&prerelease
#tool nuget:?package=StyleBro.Analyzers&version=0.1.0-alpha.1&prerelease
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
BROprefix.
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 seconddotnet format --verify-no-changesrun. - Don't duplicate the SDK. If a built-in
IDErule 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
BRO1600-series documentation: generate XML doc stubs,<inheritdoc/>on overrides and interface implementations, keep<param>in sync with parameters- StyleCop migration tool: read
stylecop.json+ rulesets and write equivalent.editorconfig - Layout rules the SDK only has as experimental (blank lines, IDE2000 series)
- Baseline support: fail only on new violations in legacy codebases
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 |