NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #224 most downloaded on NuGet
An implementation of StyleCop's rules using Roslyn analyzers and code fixes
Latest stable
1.3.180
Last release 3 days ago
19 Nov 2026
Ships unpredictably
gaps range from 8 days to 7.5 years
Nearly every release is documented
notes for 4 of 4 stable releases
2 versions withdrawn
withdrawn after publishing
127 years old
57 releases · first in 1900
Drag across the ruler to compare, or tap a release to open it.
This is the first 1.4-beta after 1.3.180. master is now the 1.4 line, with v1.3 as a servicing branch. This build adds an opt-in rule for misleading p
This is the first 1.4-beta after 1.3.180. master is now the 1.4 line, with v1.3 as a servicing branch. This build adds an opt-in rule for misleading public members on internal types, eases a few naming false positives, and runs the C# 15 tests on the official .NET 11 and Roslyn 5.12 packages.
DoNotUsePublicOnMembersOfInternalTypes) reports an explicit public modifier on a member of a type whose effective accessibility is internal, private, or private protected. The rule is disabled by default. Enable it with dotnet_diagnostic.SA1415.severity = warning. A code fix changes public to internal. (#4409, fixes #2981)obj, or when the parameter's declared type is a generic type parameter (for example T other on IFoo<T>). Ordinary inherited names are still reported. (#4427)(name, Value) = t as tuple element names when includeInferredTupleElementNames is enabled. Those variables do not create tuple element names. (#4419, fixes #4418)safe modifier is still a preview feature, so only those tests request LanguageVersion.Preview. (#4422, #4414, #4413, #4412, part of #4411)dotnet_diagnostic.SA1415.severity = warning.obj parameters or parameters whose declared type is a generic type parameter. When a method implements several interface members, an exempt member is skipped but a non-exempt one can still trigger the diagnostic.includeInferredTupleElementNames is on.Full Changelog: 1.3.180...1.4.26-beta
Your coding agent can read these notes before it upgrades. Set up the MCP server →
This is the first stable StyleCop.Analyzers release since 1.1.118. It includes the entire 1.2 beta line and the 1.3 revival: the analyzers now underst
This is the first stable StyleCop.Analyzers release since 1.1.118. It includes the entire 1.2 beta line and the 1.3 revival: the analyzers now understand C# 8 through the C# 15 previews, many long-standing bugs are fixed, and the project is once again actively maintained. Thank you to everyone who contributed code, reviews, translations and bug reports over the long gap.
allows ref struct, C# 14 extension blocks and the field keyword, and C# 15 preview unions with the closed and safe modifiers, instead of ignoring that syntax or crashing on it. (#4142, #4139, #4137, #4163, #4148, #4191, #4193)?:) expressions are laid out consistently, SA1315 requires overriding and implementing parameters to keep their inherited names, SA1317 reports identifiers that use letters outside basic Latin A–Z, SA1653 reports <summary> documentation on more than one part of a partial type, and SA1654 reports escaped generic brackets in crefs (for example List<T> vs List{T}). SX1412 is an opt-in alternative to SA1412 that requires UTF-8 without a BOM. All of these except SX1412 are on by default as warnings. (#3942, #4299, #4318, #4314, #4315, #4328).editorconfig. New settings include orderingRules.memberKindOrder, orderingRules.accessibilityOrder and layoutRules.allowBracelessIfStatements (braceless ifs are off by default; the accessibility order default is unchanged). (#4221, #3285, #4324, #4359, #4319)zh-CN) resources and documentation, finishes the Czech translations, and includes more translations of code-fix documentation text (Czech, Dutch, Russian and others). Rule documentation and status are published on GitHub Pages. (#4285, #4286, #3374, #3944, #3900, #4220, #4218)Upgrading from 1.1.118, or from a 1.2 beta, may produce new or different diagnostics:
<summary> on more than one part, but ignores generated partial declarations such as WPF *.g.cs files. (#4148, #4149, #4152, #4308, #4299, #4393)IntPtr and UIntPtr in XML documentation crefs, or in shared source compiled for targets where nint isn't equivalent. SA1121 and SA1125 also report System types in using alias targets. (#4287, #4395, #4175)includeInferredTupleElementNames is off. (#4202)_ for foreach variables and using declarations. (#4203)file modifier as an access modifier. (#4198)protected readonly fields when SA1307 is enabled. (#4217)&, |, ^) and >>>. SA1408 reports ?? mixed with && or || without parentheses. (#4289, #4323)extern alias directives using the same placement setting as using directives. (#4313)[NotNullWhen(true)] out string? foo. (#4321)maintainabilityRules.topLevelTypes setting. (#4281, #4301, #4316)documentInterfaces setting. With documentInterfaces: false, public interfaces and their members are still required when documentExposedElements is on. With documentInterfaces: "exposed", members of interfaces that aren't actually exposed are not reported. (#3140, #4346, #4343)extern alias. (#4341)? and : lines line up and are indented past the condition's last line. The SA1143 code fix keeps multi-line branches intact. (#4336, #4374, #4392).symbols.nupkg is gone, because PDBs are now embedded in the DLLs. (#4173)!) by @pantosha in #3071Note truncated.
A small follow-up to 1.3.171-beta. It accepts a common layout for collection-expression brackets and strengthens the settings default tests.
A small follow-up to 1.3.171-beta. It accepts a common layout for collection-expression brackets and strengthens the settings default tests.
Full Changelog: 1.3.171-beta...1.3.177-beta
A reliability-focused follow-up to 1.3.151-beta. It fixes several crashes and broken code fixes, checks the layout of multi-line collection expression
A reliability-focused follow-up to 1.3.151-beta. It fixes several crashes and broken code fixes, checks the layout of multi-line collection expressions, and reduces false positives in SA1121, SA1143 and SA1653.
<include>, crashes and an infinite loop in SA1500 and its code fix, crashes in the SA1642 and using-directive code fixes, and a using code fix that rewrote a non-generic System.ValueTuple alias. (#4380, #4383, #4382, #4384, #4381, #4385)IntPtr and UIntPtr where nint and nuint would be wrong, SA1653 ignores generated partial declarations such as WPF *.g.cs files, and the SA1143 fix keeps multi-line branches intact. (#4395, #4393, #4392)] shares a line with the last element. (#4396)IntPtr and UIntPtr in XML documentation crefs, or in shared source compiled for targets where nint isn't equivalent. (#4395)<summary> tags in generated partial declarations. (#4393)Full Changelog: 1.3.151-beta...1.3.171-beta
A small follow-up to 1.3.149-beta. SA1143 now accepts conditional expressions whose condition spans several lines.
A small follow-up to 1.3.149-beta. SA1143 now accepts conditional expressions whose condition spans several lines.
? and : lines line up and are indented past the condition's last line. The code fix still flattens the condition onto one line. (#4374)Full Changelog: 1.3.149-beta...1.3.151-beta
A follow-up to 1.3.133-beta, centered on code fixes: five rules that only reported problems now offer fixes, and code fixes keep the document's line e
A follow-up to 1.3.133-beta, centered on code fixes: five rules that only reported problems now offer fixes, and code fixes keep the document's line endings. SA1202 also gets a configurable accessibility order. Thanks to @bjornhellander for moving the repo itself onto the latest StyleCop.Analyzers.
<param> tags) and SA1653 (keep one partial <summary>, converting the others to <content> or removing duplicates). The SA1314 rename now also updates type parameter references in crefs. (#4353, #4352, #4354, #4372, #4361)orderingRules.accessibilityOrder setting, or stylecop.ordering.accessibilityOrder in EditorConfig, customizes the accessibility order. The default is unchanged. (#4359)<content>. (#4372)Full Changelog: 1.3.133-beta...1.3.149-beta
A follow-up to 1.3.109-beta. It fixes how SA1600 handles the documentInterfaces setting, fixes several crashes and code-fix bugs found by fuzzing, and
A follow-up to 1.3.109-beta. It fixes how SA1600 handles the documentInterfaces setting, fixes several crashes and code-fix bugs found by fuzzing, and adds a code fix for SA1648. Thanks to @sbe-schleupen for the SA1135 fix, their first contribution.
documentInterfaces adds to the general accessibility settings again, as it originally did, and "exposed" now uses each interface's effective accessibility. (#4346, #4343)<inheritdoc/>, and SA1315's message now names the expected parameter name. (#4337, #4351)documentInterfaces: false again requires documentation on public interfaces and their members when documentExposedElements is on. Earlier 1.3 betas had stopped requiring it, so warnings may come back. (#4346)documentInterfaces: "exposed" no longer reports members of interfaces that aren't actually exposed, such as internal interfaces when documentInternalElements is false, or nested interfaces inside non-public types. (#4343)extern alias. (#4341)Full Changelog: 1.3.109-beta...1.3.133-beta
A follow-up to 1.3.98-beta. It eases several layout rules that were too strict, including the new SA1143, adds a rule for generic cref syntax, and imp
A follow-up to 1.3.98-beta. It eases several layout rules that were too strict, including the new SA1143, adds a rule for generic cref syntax, and improves code fixes. Thanks to @bgrainger for the SA1143 fix, their first contribution.
?? right after a switch expression's closing brace. (#4336, #4331, #4333, #4334)crefs, for example List<T>, and its code fix converts them to List{T}. (#4328){T} rather than escaped <T> in cref attributes) is enabled as a warning. (#4328)Full Changelog: 1.3.98-beta...1.3.109-beta
This release adds three new rules and a long-requested code fix, makes member ordering and braceless guard clauses configurable, and tightens several
This release adds three new rules and a long-requested code fix, makes member ordering and braceless guard clauses configurable, and tightens several existing rules. The package also has an icon now.
?:) expressions are laid out consistently. SA1315 checks that overriding and implementing parameters keep their inherited names. SX1412 is an opt-in alternative to SA1412 that requires UTF-8 without a BOM. All three come with code fixes. (#4318, #4314, #4315)orderingRules.memberKindOrder setting customizes the SA1201 member-kind order, and layoutRules.allowBracelessIfStatements lets SA1501 and SA1503 allow compact guard clauses. Both are off by default. (#4324, #4319)extern alias directives using the same placement setting as using directives. (#4313)[NotNullWhen(true)] out string? foo. (#4321)?? mixed with && or || without parentheses. (#4323)maintainabilityRules.topLevelTypes setting, so the expected file name may change. (#4316)Full Changelog: 1.3.82-beta...1.3.98-beta
A small follow-up to 1.3.79-beta. The SA1504 code fix no longer drops comments or blank lines when it expands accessors onto multiple lines. The docum
A small follow-up to 1.3.79-beta. The SA1504 code fix no longer drops comments or blank lines when it expands accessors onto multiple lines. The documentation's opening pages have also been reorganized. No diagnostics change in this release.
Full Changelog: 1.3.79-beta...1.3.82-beta
This release follows 1.3.18-beta with two new rules, a round of fixes for long-standing false positives, and better code fixes. It also adds Simplifie
This release follows 1.3.18-beta with two new rules, a round of fixes for long-standing false positives, and better code fixes. It also adds Simplified Chinese resources and documentation. Thanks to @melomory for contributing SA1317, their first contribution to the project.
<summary> documentation on more than one part. (#3942, #4299)catch and finally blocks, SA1118 allows multi-line tuple arguments, SA1629 accepts ! and ?, and SA1515 and SA1005 ignore tool marker comments such as ReSharper, language injection and NOSONAR. SA1305 skips DllImport parameters, and SA1402 and SA1649 accept supporting types in files with top-level statements. (#4290, #4284, #4298, #4302, #4297, #4306)zh-CN) resources and documentation, and finishes the Czech translations. (#4285, #4286)<summary>, #4299) are both enabled by default as warnings. Codebases with non-Latin identifiers, or with summaries on several parts of a partial type, will see new diagnostics.&, |, ^) and >>>, so mixed-precedence expressions using them get new diagnostics. (#4289)-warnAsError except for NuGet warnings by @AArnott in #4304Full Changelog: 1.3.18-beta...1.3.79-beta
SA1134: exempt attributes on auto-property accessors by @AArnott in https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/4260
Full Changelog: https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.3.1-beta...1.3.18-beta
One column per quarter.