Ferrous.CodeFixes
2.7.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Ferrous.CodeFixes --version 2.7.0
NuGet\Install-Package Ferrous.CodeFixes -Version 2.7.0
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="Ferrous.CodeFixes" Version="2.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ferrous.CodeFixes" Version="2.7.0" />
<PackageReference Include="Ferrous.CodeFixes" />
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 Ferrous.CodeFixes --version 2.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ferrous.CodeFixes, 2.7.0"
#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 Ferrous.CodeFixes@2.7.0
#: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=Ferrous.CodeFixes&version=2.7.0
#tool nuget:?package=Ferrous.CodeFixes&version=2.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ferrous.CodeFixes
Roslyn IDE CodeFixProviders and CodeRefactoringProviders for the Ferrous analyzer suite:
Diagnostic Quick-Fixes (Ctrl+.)
FE0001(MustUseCodeFixProvider): Inserts an explicit_ = ...discard for ignored[MustUse]values.FE0301/FE0302(TypestateCodeFixProvider): Adds[ConsumesSelf]to typestate transition methods and captures discarded transition results invar next = ....FE0400(PedanticCodeFixProvider): Scaffolds missingenum,[Closed]/closed, and[DiscriminatedUnion]arms/cases in bothswitchexpressions andswitchstatements.FE0401(PedanticCodeFixProvider): Replaces.Unwrap()/.Expect(...)with.UnwrapOr(default),.Match(...), or early-return?-style error propagation insideResult-returning methods.FE0403(PedanticCodeFixProvider): Converts capturingScopeGuard.Defer(() => ...)to zero-allocationScopeGuard.Defer(state, static s => ...).FE0405(ExtendedSafetyCodeFixProvider): Generates a privateSystem.Threading.Lock _lock = new();field and swaps thelocktarget.FE0406(ExtendedSafetyCodeFixProvider): Replaces null-forgivingexpr!withOption.FromNullable(expr)or an explicitArgumentNullExceptionguard.FE0407(SafetyCodeFixProvider): Changesasync voidreturn type toasync Task.FE0408(PedanticCodeFixProvider): Explicitly discards an unawaitedTask/ValueTaskwith_ = ...or addsawait(converting the method toasync Taskif needed).FE0409(SafetyCodeFixProvider): Replaces blocking sync-over-async.Result/.Wait()/.GetAwaiter().GetResult()withawait.FE0410(PedanticCodeFixProvider): Replaces throwing LINQ calls (First/Single/Last/ElementAt) with*OrDefault().FE0411(ExtendedSafetyCodeFixProvider): Addsthrow;inside swallowed emptycatchblocks.FE0412(ExtendedSafetyCodeFixProvider): Adds thereadonlymodifier to non-mutating struct members causing defensive copies.FE0414/FE0415(SafetyCodeFixProvider): Wraps unchecked arithmetic or lossy numeric casts inchecked(...).FE0416(ExtendedSafetyCodeFixProvider): Replaces exact floating-point==/!=with epsilon tolerance comparisons.FE0417(SafetyCodeFixProvider): Inserts a// SAFETY: ...justification comment stub aboveunsafeblocks.FE0419(PedanticCodeFixProvider): Converts leaked disposable locals tousing var.FE0420(SafetyCodeFixProvider): Rewrites unchecked indexingcol[i]to safecol.Get(i).FE0425(ClippyAndConcurrencyCodeFixProvider): Removes needless.ToList()/.ToArray()materializations and rewrites.Count() > 0to.Any().FE0427(ClippyAndConcurrencyCodeFixProvider): Rewritesif (x.IsOk / IsSome / IsErr)+.Unwrap()/.UnwrapErr()toTryGetOk/TryGetValue/TryGetErr.FE0428(ExtendedSafetyCodeFixProvider): Rewrites mutable collection properties (List<T>,Dictionary<K,V>,HashSet<T>,T[]) onrecord/[Immutable]types toImmutableArray<T>/ImmutableDictionary<K,V>/ImmutableHashSet<T>.FE0501(SafetyCodeFixProvider): Wraps mutablestaticfields inMutex<T>.FE0503(ClippyAndConcurrencyCodeFixProvider): Rewrites detachedTask.Run(...)inside aTaskScopeto<scope>.Spawn(...).
IDE Refactorings
FerrousMigrationRefactoringProvider: Converts throwing methods →Result<T, string>, nullable-returning methods (T?) →Option<T>, and primitive parameters →[Newtype(typeof(T))]structs.FerrousStructuralMigrationRefactoringProvider: Convertsabstract recordhierarchies →[DiscriminatedUnion]andlock (_gate)+ field →Mutex<T>.
Installation
dotnet add package Ferrous.CodeFixes
Or install everything at once via the Ferrous metapackage:
dotnet add package Ferrous
See ferrous.westness.cc and the Wiki for full documentation.
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Ferrous.Annotations (>= 2.7.0)
- Ferrous.Pedantic (>= 2.7.0)
- Ferrous.States (>= 2.7.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ferrous.CodeFixes:
| Package | Downloads |
|---|---|
|
Ferrous
Rust-grade compile-time safety, zero-allocation primitives, source generators, and Clippy-style Roslyn analyzers for .NET (polyfilling on .NET 10 and lighting up natively on .NET 11 / C# 15). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 0 | 11/30/2026 |
| 2.8.1 | 0 | 11/30/2026 |
| 2.8.0 | 0 | 11/30/2026 |
| 2.7.0 | 0 | 11/30/2026 |
| 2.6.0 | 0 | 11/30/2026 |
| 2.4.2 | 0 | 11/30/2026 |
| 2.4.1 | 0 | 11/30/2026 |
| 2.4.0 | 0 | 11/30/2026 |
| 2.3.0 | 0 | 11/30/2026 |
| 2.2.0 | 0 | 11/30/2026 |
| 2.1.0 | 0 | 11/30/2026 |
| 2.0.0 | 0 | 11/30/2026 |
| 1.7.4 | 0 | 11/30/2026 |
| 1.7.3 | 0 | 11/30/2026 |
| 1.7.2 | 0 | 11/30/2026 |
| 1.7.1 | 0 | 11/30/2026 |
| 1.7.0 | 0 | 11/30/2026 |
| 1.6.0 | 0 | 11/30/2026 |
| 1.5.0 | 0 | 11/30/2026 |
Loading failed