Changelog

Every published release of E128.Analyzers. The current package version is 3.12.4.

Rule retirement

Version 3.0.0 removes E128160, which reported redirected process streams that were not read before a wait. E128223 reports the separate read-then-wait pattern.

Unreleased

No unreleased changes.

3.12.4

No rule changes.

3.12.3

No rule changes.

3.12.2

No rule changes.

3.12.1

No rule changes.

3.12.0

New Rules

Rule IDCategorySeverityNotes
E128272E128-SecurityInfoOpt-in post-quantum migration review for classical encryption, signing, and key agreement.

3.11.2

No rule changes.

3.11.1

No rule changes.

3.11.0

New Rules

Rule IDCategorySeverityNotes
E128270E128-ReliabilityWarningPooled buffer rented and never returned
E128271E128-PerformanceInfoMemoryStream round trip copies a byte array

3.10.2

No rule changes.

3.10.0

New Rules

Rule IDCategorySeverityNotes
E128269E128-ReliabilityWarningDeclaration syntax from DeclaringSyntaxReferences is read with a SemanticModel in scope and no syntax tree check.

3.9.0

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128014E128-ReliabilityWarningE128-ReliabilityWarningReads an escaped literal paren or dot as an atom, and compares two classes by membership. A markdown-link atomic group, (\w+\))+, and ([ab]+[cd])+ stay silent.
E128218E128-DesignInfoE128-DesignInfoRecognizes a two-member bool cluster, a separate-site lifecycle pair, a nullable union, and a nullable-plus-bool pair. Adds ref-alias, ref-return, Unsafe, and CompareExchange writes. Changes the title.
E128263E128-SecurityWarningE128-SecurityWarningAccepts a guarded += separator append, a guarded separator conditional, and a parameter whose callers pass a safe root.

3.8.1

No rule changes.

3.8.0

New Rules

Rule IDCategorySeverityNotes
E128256E128-SecurityWarningA logger call passes a local filesystem path.
E128257E128-DesignWarningA property on a configuration-bound options type is not public.
E128258E128-ReliabilityWarningA service lookup throws a generic exception with no key.
E128259E128-DesignInfoA type name is the plural of a sibling type.
E128260E128-ReliabilityWarningRetained memory is read after its owner is disposed.
E128261E128-UnsafeWarningByte-wise access of a padded struct.
E128262E128-DesignInfoIHttpContextAccessor injected into a plain service.
E128263E128-SecurityWarningA containment test compares a root with no directory separator.
E128264E128-SecurityWarningOverlapping alternatives in a repeated [GeneratedRegex] group.
E128265E128-SecurityWarningNon-constant regex pattern with no timeout.
E128266E128-SecurityWarningCertificate chain result ignored or policy weakened.
E128267E128-SecurityWarningDecompression loop with no output bound.
E128268E128-SecurityWarningSymmetric key set from a text encoding.

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128033E128-ReliabilityWarningE128-ReliabilityWarningResolves the Bind receiver type and accepts BindConfiguration.
E128013E128-ReliabilityWarningE128-ReliabilityWarningCounts three or more unbounded wildcards.
E128014E128-ReliabilityWarningE128-ReliabilityWarningReports a repeated group whose last atom is optional.

3.7.1

No rule changes.

3.7.0

New Rules

Rule IDCategorySeverityNotes
E128254E128-UnsafeWarningA reflection write sets a static readonly field of a non-framework type. The runtime inlines the field, so the new value reaches no inlined read.
E128255E128-PerformanceWarningAn element-wise loop over a float or double span reimplements TensorPrimitives.Add or TensorPrimitives.Multiply.

3.6.1

No rule changes.

3.6.0

New Rules

Rule IDCategorySeverityNotes
E128253E128-PerformanceWarningA struct used as a dictionary or set key without IEquatable<T> boxes the key on each lookup.

3.5.6

No rule changes.

3.5.3

No rule changes.

3.5.1

Removed Rules

Rule IDCategorySeverityNotes
E128252E128-PerformanceInfoRemoved. The span API never avoids the allocation, because both Convert base64 calls take or return a string.

3.5.0

New Rules

Rule IDCategorySeverityNotes
E128238E128-ReliabilityWarningArray compared by reference
E128239E128-ReliabilityWarningStream.Read count is discarded
E128240E128-ReliabilityWarningBlocking call inside a lock
E128241E128-SecurityWarningCORS wildcard with credentials
E128242E128-SecurityWarningAntiforgery missing on a state-changing action
E128243E128-ReliabilityWarningSpan over a list invalidated by a later mutation
E128244E128-ReliabilityWarningZero guard after the division
E128245E128-ReliabilityWarningEnum cast outside the member set
E128246E128-ReliabilityWarningFlags member value is not a power of two
E128247E128-PerformanceWarningReadonly field of a mutable struct
E128248E128-ReliabilityWarningFloating-point loop counter
E128249E128-PerformanceWarningArray regrown inside a loop
E128250E128-ReliabilityWarningDead store to a private field
E128251E128-ReliabilityWarningLoop has no exit path
E128252E128-PerformanceInfoBase64 conversion allocates a string

3.4.0

New Rules

Rule IDCategorySeverityNotes
E128232E128-DesignWarningThe dynamic keyword defeats compile-time type checking
E128233E128-PerformanceWarningParallel.For runs one delegate per item
E128234E128-ReliabilityWarningA FileStream position is shared across parallel readers
E128235E128-PerformanceWarningReadonly array field re-read inside a loop
E128236E128-TestingWarningA test waits a fixed delay instead of a signal
E128237E128-TestingWarningA test is disabled outside the xUnit Skip form

3.3.0

New Rules

Rule IDCategorySeverityNotes
E128229E128-PerformanceWarningMiddleware binds the Func<Task> next delegate
E128230E128-PerformanceWarningStatic files served through the runtime pipeline
E128231E128-PerformanceWarningSplit result enumerated without a stored array

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128084E128-PerformanceWarningE128-PerformanceWarningAlso reports a List indexer loop that reads list[i]
E128135E128-PerformanceWarningE128-PerformanceWarningAlso reports a min or max loop with a neutral initial value

3.2.0

New Rules

Rule IDCategorySeverityNotes
E128228E128-SecurityWarningToken validation flag set to constant false

3.1.1

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128220E128-DesignWarningE128-DesignWarningAlso reports a when-guarded discard or var arm because a guard never closes the arm
E128221E128-DesignWarningE128-DesignWarningMessage names a case pattern only, because a compiler-declared union exposes no TryGetValue member

3.1.0

New Rules

Rule IDCategorySeverityNotes
E128227E128-SecurityWarningHTTP body read without a size bound

3.0.0

Removed Rules

Rule IDCategorySeverityNotes
E128160E128-ReliabilityWarningE128223 reports the read-then-wait shape that replaced the hand-rolled process capture, so the rule guards a shape no caller writes.

2.11.0

New Rules

Rule IDCategorySeverityNotes
E128223E128-ReliabilityWarningHand-rolled process capture instead of Process.RunAndCaptureText
E128224E128-PerformanceWarningRead-only MemoryStream over a string or byte array
E128225E128-DesignWarningAbstract base with members should be closed
E128226E128-PerformanceWarningComparer set built by a constructor and an Add loop

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128220E128-DesignWarningE128-DesignWarningAlso reports a switch over a closed class hierarchy that ends in a discard arm

2.10.0

New Rules

Rule IDCategorySeverityNotes
E128219E128-DesignWarningMemberless abstract base with all derivation in one assembly should be closed
E128220E128-DesignWarningUnion switch ends in a discard or var arm instead of a null arm
E128221E128-DesignWarningUnion Value read or case cast outside a pattern match

2.9.0

New Rules

Rule IDCategorySeverityNotes
E128222E128-SecurityWarningPath.Combine of a root FullName and a run-time leaf with no containment check

2.8.0

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128218E128-DesignInfoE128-DesignInfoRecognizes a forwarding accessor pair, a mutable struct, and a cross-type write. Adds e128_state_min_transition_bodies.

2.7.0

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128062E128-TestingWarningE128-TestingWarningRecognizes Net110 as a known reference-assembly version, so the rule reports in a net11.0 test project.

2.6.0

New Rules

Rule IDCategorySeverityNotes
E128218E128-DesignInfoBoolean flags encode one state.

2.5.0

New Rules

Rule IDCategorySeverityNotes
E128203PerformanceWarningHTTP request inside a loop creates N+1 round trips
E128204PerformanceWarningDatabase command inside a loop runs one round trip per iteration
E128205PerformanceWarningCollection filled in a loop has a known final count
E128206PerformanceWarningEmpty loop body spins the CPU
E128207PerformanceWarningReflection lookup inside a loop
E128208PerformanceWarningConcurrent dictionary lookup done twice
E128209PerformanceWarningGetBytes(...).Length inside a loop allocates a byte array
E128210PerformanceWarningRegex instance created inside a loop
E128211PerformanceWarningTask.Delay in a loop has no cancellation token
E128212PerformanceWarningToCharArray result used only for indexing or iteration
E128213PerformanceWarningActivator.CreateInstance inside a loop
E128214PerformanceWarningHTTP handler does not enable automatic decompression
E128215PerformanceWarningStringBuilder created without capacity for a known append count
E128216PerformanceWarningUnbounded channel can grow without limit
E128217PerformanceWarningLarge struct passed by value

2.4.0

New Rules

Rule IDCategorySeverityNotes
E128202E128-SecurityInfoUnvalidated JWT claims used as an identity.

2.3.0

New Rules

Rule IDCategorySeverityNotes
E128199E128-MaintainabilityInfoDirect recursion in a method.
E128200E128-UnsafeWarningFunction pointer type instead of a delegate.
E128201E128-MaintainabilityInfoConditional directive count past the ceiling.

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128187E128-PerformanceInfoE128-PerformanceWarningSeverity lowered. The default cap is the processor count, not one task per item.
E128197E128-ReliabilityInfoE128-ReliabilityWarningSeverity lowered. A 28 to 31 day span is often a fixed retention window, not a calendar month.

Removed Rules

Rule IDCategorySeverityNotes
E128022DesignWarningRemoved. Other rules cover this check.

2.2.0

New Rules

Rule IDCategorySeverityNotes
E128154E128-ReliabilityWarningA singleton registration whose implementation type takes a scoped service in its constructor is reported. The singleton keeps the first scoped instance for the life of the application. A second descriptor on the same id reports an Entity Framework Core DbContext registered as a singleton through AddSingleton, TryAddSingleton, AddKeyedSingleton, a typeof(...) overload, or a constant ServiceLifetime.Singleton lifetime.
E128155E128-ReliabilityWarningA call in a foreach body that mutates the collection the loop enumerates is reported. The enumerator throws InvalidOperationException on the next step.
E128156E128-SecurityErrorAn HttpClientHandler certificate validation callback that accepts every certificate is reported. A callback that reads the chain or the policy errors is not reported.
E128157E128-SecurityWarningAn equality, inequality, or SequenceEqual comparison over a secret-derived byte sequence is reported. Use CryptographicOperations.FixedTimeEquals instead.
E128159E128-ReliabilityWarningA TaskCompletionSource created without TaskCreationOptions.RunContinuationsAsynchronously is reported. A computed options value is not reported. A second descriptor on the same id reports SetResult, SetException, or SetCanceled on a source stored in a field.
E128161E128-ReliabilityWarningA Path.Combine call with a constant rooted or parent segment is reported. A rooted segment discards every earlier segment.
E128162E128-ReliabilityWarningA read of a local after the same block calls Dispose on it is reported. The object throws ObjectDisposedException on the next member call that reads its state.
E128163E128-ReliabilityWarningAn ImmutableArray field that no initializer and no assignment reaches is reported. The default array throws NullReferenceException on read.
E128164E128-SecurityWarningA string literal that starts with http:// or https:// and carries a host is reported outside a test compilation. Attribute arguments, namespace and schema hosts, and example hosts are not reported. A property initializer on an Options type and a const or static readonly field are not reported; a local const inside a method is.
E128165E128-SecurityWarningA credential-named string literal of 8 or more characters, and a connection string that holds a password, are reported outside a test compilation. An empty value, a format placeholder, and an uppercase value joined by underscores are not reported.
E128166E128-SecurityWarningAn ILogger call that passes a value, or an interpolated hole, named for a credential or personal-data word is reported outside a test compilation. Cancellation tokens and metadata names such as TokenCount are not reported.
E128167E128-StyleWarningA TODO, FIXME, or HACK comment that does not match e128_tracked_ref_pattern is reported. The default pattern accepts AB#123 and #123.
E128168E128-TestingWarningA Fact or Theory Skip reason that does not match e128_tracked_ref_pattern is reported.
E128169E128-StyleWarningAn Obsolete attribute with no message, or an empty message, is reported.
E128170E128-ReliabilityWarningA constant index of 1 or more taken from a string.Split result with no Length read in the member is reported. Index 0 and from-end indexes are not reported.
E128171E128-TestingWarningAn xUnit test whose whole body is one Assert.Fail call is reported.
E128172E128-TestingWarningA catch of Exception or XunitException with no rethrow, around a try block that calls Assert, is reported.
E128173E128-StyleWarningA SuppressMessage or ExcludeFromCodeCoverage attribute with no Justification, or a blank one, is reported.
E128174E128-DesignWarningA constructor or primary constructor with more class or interface parameters than e128_max_ctor_dependencies is reported. The default ceiling is 7.
E128175E128-ReliabilityWarningA SemaphoreSlim.Wait or WaitAsync call with no later try/finally that calls Release on the same semaphore is reported. The plain and CancellationToken overloads are checked. A timeout overload and a wait inside a releasing try are not reported.
E128176E128-ReliabilityWarningAn event subscription in a disposable type whose handler reads the subscriber instance is reported when no Dispose or DisposeAsync method removes the same event. A static handler and a handler that reads only a parameter or a local are not reported.
E128177E128-ReliabilityWarningA record member with a mutable collection type is reported, because the generated equality compares it by reference. An immutable collection, an abstract property, a computed property, a static member, and a const field are not reported.
E128178E128-ReliabilityErrorTwo members of one type that map to the same JsonPropertyName value are reported. An ignored member, an indexer, a static member, and an override of the base member are not reported. The rule stays off when System.Text.Json is absent from the compilation.
E128179E128-DesignWarningAn AddOptions or Configure registration that binds configuration with no validation call is reported. A bare AddOptions, the delegate overload of Configure, and PostConfigure are not reported.
E128180E128-PerformanceWarningAn Entity Framework Core materializing call inside a loop body is reported. A call in a foreach source expression, a for initializer, or with no enclosing loop is not reported. The rule stays off when EF Core is absent from the compilation.
E128181E128-ReliabilityWarningAn assignment of Timeout.InfiniteTimeSpan or TimeSpan.FromMilliseconds(-1) to HttpClient.Timeout is reported. A computed value is not reported.
E128182E128-ReliabilityWarningA second enumeration of one IAsyncEnumerable value in one method body is reported. An inline-created sequence, an EnumeratorCancellation parameter, and an iterator with yield are not reported.
E128183E128-ReliabilityWarningA Task.WhenAny result that is discarded or stored in a local that the block never reads is reported. An awaited, returned, stored, or passed result is not reported.
E128184E128-SecurityInfoA recursive Directory.Delete or DirectoryInfo.Delete is reported when the path is a parameter, a member read, or a Path.Combine over either. A path under Path.GetTempPath, a literal, and a StartsWith guard are not reported.
E128185E128-PerformanceWarningA SaveChanges or SaveChangesAsync call on an Entity Framework Core context inside a loop body is reported. A call in a foreach source expression, a for initializer, or with no enclosing loop is not reported. The rule stays off when EF Core is absent from the compilation.
E128186E128-ReliabilityWarningAn await expression inside a finally block is reported. An await in a try block, a catch clause, a local function, or a lambda declared in the finally body is not reported, and neither is an await inside a nested try.
E128187E128-PerformanceWarningA Parallel.ForEachAsync call with no ParallelOptions argument, or with an inline initializer that sets no MaxDegreeOfParallelism, is reported. Options held in a variable, a parameter, a field, or a factory call are not reported.
E128188E128-ReliabilityWarningA catch filter that reads Message, StackTrace, or ToString on the caught exception is reported. A filter that reads HResult or InnerException, or reads the member on another object, is not reported.
E128189E128-ReliabilityWarningA GCHandle.Alloc result stored in a local with no Free call in the same body is reported. A local that is passed to a method, returned, or stored in a field or a collection is not reported.
E128190E128-PerformanceWarningA FileStream construction with no asynchronous switch is reported: useAsync omitted or false, and no FileOptions.Asynchronous. A useAsync value of true, an options value with Asynchronous, a non-constant argument, and the SafeFileHandle overload are not reported.
E128191E128-SecurityWarningAn X509Certificate2 PFX constructor or an X509CertificateLoader.LoadPkcs12 call is reported when the flags omit EphemeralKeySet. A constant flags value with EphemeralKeySet, a non-constant flags value, a byte array constructor, and a constructor with no flags parameter are not reported.
E128192E128-ReliabilityWarningA MemoryStream.GetBuffer call is reported when the receiver was created without publiclyVisible: true. A creation with publiclyVisible: true, a non-constant flag, and a receiver that is a field, a property, or a method result are not reported.
E128193E128-ReliabilityWarningAn assignment to a disposable field inside a loop with no earlier dispose call on that field in that loop is reported. A disposal before the assignment, a local, a parameter, a property, a compound assignment, and an assignment outside a loop are not reported.
E128194E128-ReliabilityWarningA Lazy<T> field initialized with LazyThreadSafetyMode.None is reported. An omitted mode, ExecutionAndPublication, PublicationOnly, a non-constant mode, and a local, parameter, or property initializer are not reported.
E128195E128-ReliabilityWarningA constant configuration key read through IConfiguration, GetSection, or GetConnectionString is reported when no JSON additional file defines the key. The rule stays off when no parsable JSON additional file is present. A key in the e128_added_configuration_keys option is accepted.
E128196E128-ReliabilityWarningA write to a JsonSerializerOptions member after the same body passes the instance to JsonSerializer is reported. The serializer freezes the instance on first use, so the write throws InvalidOperationException.
E128197E128-ReliabilityWarningA TimeSpan.FromDays call with a 28 to 31 day constant added to or subtracted from a DateTime or DateTimeOffset is reported. A calendar month has no fixed day count. A span held in a variable is not reported.
E128198E128-ReliabilityWarningA two-argument string.Substring call whose count is a Length value minus a positive constant is reported. A short string makes the count negative, so the call throws ArgumentOutOfRangeException. A length test on the same string in an enclosing condition clears the report.

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128001E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128002E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128003E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128004E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128005E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128006E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128007E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128008E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128009E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128010E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128011E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128012E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128013E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128014E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128015E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128016E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128017E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128018E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128019E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128020E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128021E128-DesignErrorDesignErrorThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128023E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128024E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128025E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128026E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128027E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128028E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128029E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128030E128-DesignInfoDesignInfoThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128031E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128032E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128033E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128034E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128035E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128036E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128037E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128038E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128039E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128040E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128041E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128042E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128043E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128044E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128045E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128046E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128047E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128048E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128049E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128050E128-DesignErrorDesignErrorThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128051E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128052E128-DesignInfoDesignInfoThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128053E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128054E128-TestingWarningTestingWarningThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128055E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128056E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128057E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128058E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128059E128-DesignErrorDesignErrorThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128060E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128061E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128062E128-TestingWarningTestingWarningThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128063E128-StyleErrorStyleErrorThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128064E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128065E128-StyleWarningStyleWarningThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128066E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128067E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128068E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128069E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128070E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128071E128-SecurityWarningSecurityWarningThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128072E128-PerformanceInfoPerformanceInfoThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128073E128-TestingWarningTestingWarningThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128074E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128075E128-SecurityWarningSecurityWarningThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128076E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128077E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128078E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128079E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128080E128-DesignErrorDesignErrorThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128081E128-PerformanceInfoPerformanceInfoThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128082E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128083E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128084E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128085E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128086E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128087E128-DesignWarningDesignWarningThe category gains the E128- prefix, so category-E128-Design selects the rules of one area.
E128088E128-MaintainabilityWarningMaintainabilityWarningThe category gains the E128- prefix, so category-E128-Maintainability selects the rules of one area.
E128089E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128090E128-MaintainabilityInfoMaintainabilityInfoThe category gains the E128- prefix, so category-E128-Maintainability selects the rules of one area.
E128091E128-SecurityWarningSecurityWarningThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128092E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128093E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128094E128-StyleErrorStyleErrorThe category gains the E128- prefix, so category-E128-Style selects the rules of one area.
E128096E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128097E128-TestingWarningTestingWarningThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128098E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128099E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128100E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128101E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128102E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128103E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128104E128-TestingWarningTestingWarningThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128105E128-TestingWarningTestingWarningThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128106E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128107E128-TestingInfoTestingInfoThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128108E128-TestingWarningTestingWarningThe category gains the E128- prefix, so category-E128-Testing selects the rules of one area.
E128109E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128110E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128111E128-ReliabilityWarningReliabilityWarningThe category gains the E128- prefix, so category-E128-Reliability selects the rules of one area.
E128112E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128113E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128114E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128115E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128116E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128117E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128118E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128119E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128120E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128121E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128122E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128123E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128124E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128125E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128126E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128127E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128128E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128129E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128131E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128132E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128133E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128134E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128135E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128136E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128137E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128138E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128139E128-UnsafeWarningUnsafeWarningThe category gains the E128- prefix, so category-E128-Unsafe selects the rules of one area.
E128140E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128141E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.
E128142E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128143E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128144E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128145E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128146E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128147E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128148E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128149E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128150E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128151E128-SecurityErrorSecurityErrorThe category gains the E128- prefix, so category-E128-Security selects the rules of one area.
E128152E128-PerformanceWarningPerformanceWarningA coordinate step adds no loop depth. An inner loop whose trip count reads an element the enclosing loop produced, such as a cell inside a row, no longer counts against that enclosing loop.
E128153E128-PerformanceWarningPerformanceWarningThe category gains the E128- prefix, so category-E128-Performance selects the rules of one area.

1.67.0

New Rules

Rule IDCategorySeverityNotes
E128153PerformanceWarningList.RemoveAt(0) in loop creates O(n²) complexity

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128152PerformanceWarningPerformanceWarningLoop depth counts only varying trip counts, cubic becomes a tier, recursion is classified by argument contraction, and memoization needs a read and a write.

1.66.0

New Rules

Rule IDCategorySeverityNotes
E128142SecurityErrorDo not instantiate a Managed or CNG cryptography type
E128143SecurityErrorUse an RSA key of at least 3072 bits or an approved curve
E128144SecurityErrorUse an authenticated cipher mode
E128145SecurityErrorUse a strong PBKDF2 configuration
E128146SecurityErrorUse TLS 1.2 or later
E128147SecurityErrorRNGCryptoServiceProvider is deprecated
E128148SecurityErrorDo not use a cipher excluded by policy
E128149SecurityErrorUse the full 16-byte AES-GCM tag
E128150SecurityErrorDo not use SHA-3, SHAKE or KMAC
E128151SecurityErrorUse an HMAC key at least as long as the hash output
E128152PerformanceWarningFlags complexity past the e128_max_complexity ceiling: nested loops depth 2+ and non-memoized recursion

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128071SecurityErrorSecurityWarningFIPS cryptography policy. A broken algorithm is a build-breaking defect.
E128075SecurityErrorSecurityWarningFIPS cryptography policy. A predictable RNG in a security context is a build-breaking defect.

1.60.4

New Rules

Rule IDCategorySeverityNotes
E128131PerformanceWarningParse UTF-8 bytes with the span overload instead of a decoded string
E128132PerformanceWarningDo not use a culture comparer for a dictionary or hash set key
E128133PerformanceWarningUse an alternate lookup instead of a temporary string key
E128134PerformanceWarningUse BitOperations.PopCount instead of a shift loop
E128135PerformanceWarningUse TensorPrimitives.Sum instead of a sum loop
E128136UnsafeWarningDo not pair a pointer parameter with a separate length parameter
E128137UnsafeWarningDo not bind to a non-public BCL member through reflection
E128138UnsafeWarningDo not build dynamic methods with raw IL
E128139UnsafeWarningDo not move a non-blittable type through an unaligned access
E128140PerformanceWarningUse a span bulk method instead of an element loop
E128141PerformanceWarningUse a u8 literal instead of Encoding.UTF8.GetBytes

1.42.1

New Rules

Rule IDCategorySeverityNotes
E128112UnsafeWarningUse Unsafe.BitCast instead of Unsafe.As
E128113UnsafeWarningUse the unaligned Unsafe read and write methods
E128114UnsafeWarningIndex the array instead of bypassing its bounds check
E128115UnsafeWarningDo not reinterpret between bool and int
E128116PerformanceWarningDo not use MethodImplOptions.AggressiveOptimization
E128117PerformanceWarningUse LibraryImport instead of DllImport
E128118UnsafeWarningDo not reinterpret bytes as a non-blittable type
E128119UnsafeWarningUse an inline array instead of a fixed-size buffer
E128120UnsafeWarningDo not skip local initialization without a measured reason
E128121PerformanceWarningUse SequenceEqual instead of an element-by-element loop
E128122PerformanceWarningGuard an expensive log argument with IsEnabled
E128123PerformanceWarningUse GeneratedRegex for a constant pattern
E128124PerformanceWarningCache SearchValues in a static readonly field
E128125UnsafeWarningPin the object explicitly with fixed
E128126UnsafeWarningDo not write to a string through a fixed pointer
E128127UnsafeWarningDo not create a null managed reference
E128128UnsafeWarningKeep the delegate alive while native code holds its function pointer
E128129UnsafeWarningDo not bulk-copy a type that holds references

1.42.0

New Rules

Rule IDCategorySeverityNotes
E128109ReliabilityWarningstackalloc must be bounded and outside loops
E128110ReliabilityWarningZero a pooled buffer in a finally block before Return
E128111ReliabilityWarningPooled buffer used after Return

1.41.12

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128107TestingInfoTestingInfoDisabled by default; predicates recalibrated (DuplicateCoverage keys on the whole test body, SelfFulfillingExpected requires same-expression operands, NoAssertion exempts a void-returning production call)
E128108TestingWarningTestingWarningDisabled by default; predicates recalibrated (DuplicateCoverage keys on the whole test body, SelfFulfillingExpected requires same-expression operands, NoAssertion exempts a void-returning production call)

1.41.3

New Rules

Rule IDCategorySeverityNotes
E128107TestingInfoTest matches one low-value test condition
E128108TestingWarningTest matches two or more low-value test conditions

1.41.0

New Rules

Rule IDCategorySeverityNotes
E128101ReliabilityWarningVerify process output file exists after WaitForExit before reading
E128102PerformanceWarningUse SearchValues<char> for IndexOfAny scans
E128103ReliabilityWarningResolve a service type that has no registration in the compilation
E128104TestingWarningAssert call whose operands are all literals
E128105TestingWarningTest method calls an out-of-repo resolver without a skip guard
E128106PerformanceWarningIndex a collection with a bound taken from a different collection

1.39.0

New Rules

Rule IDCategorySeverityNotes
E128094StyleErrorPragma warning disable placed before a file-scoped namespace declaration
E128097TestingWarningComment inside a type that holds an xUnit Fact or Theory member
E128088MaintainabilityWarningSwitch over an enum does not case every member and has no default arm

1.38.0

New Rules

Rule IDCategorySeverityNotes
E128093ReliabilityWarningUse async DbConnection/DbCommand *Async overload instead of sync method (outside already-async methods)
E128096ReliabilityWarningDetect synchronous call to async local function via .Result or .Wait()
E128098PerformanceWarningDetect chained string Replace calls
E128099ReliabilityWarningDetect process exit waits without a timeout
E128100ReliabilityWarningCatch filter reads negated token state on OperationCanceledException

1.35.0

New Rules

Rule IDCategorySeverityNotes
E128091SecurityWarningProcessStartInfo.Arguments assigned a built string instead of ArgumentList
E128092ReliabilityWarningUse async File.*Async overload instead of sync method (outside already-async methods)

1.31.0

New Rules

Rule IDCategorySeverityNotes
E128076ReliabilityWarningMaterialize QuerySelectorAll result before iterating
E128077ReliabilityWarningTextContent string match requires a preceding length guard
E128078ReliabilityWarningGetAttribute("href") on element that does not carry href
E128079ReliabilityWarningCompositeDetection with single generic ID selector lacks specificity
E128080DesignErrorUse ByteSize for data-size values to avoid unit ambiguity
E128081PerformanceInfoUse StringBuilderPool instead of new StringBuilder()
E128082DesignWarningDo not unwrap ByteSize via cast
E128083PerformanceWarningUse ImmutableCollectionsMarshal.AsImmutableArray instead of ImmutableArray.Create(x.ToArray())
E128084PerformanceWarningUse CollectionsMarshal.AsSpan with Slice instead of List.GetRange
E128085PerformanceWarningUse foreach+AddRange instead of SelectMany.ToList
E128086ReliabilityWarningArrayPool buffer used as SqliteParameter value without Size
E128087DesignWarningStatic numeric field should not be incremented with ++/--
E128089ReliabilityWarningBare .Parse() call without TryParse
E128090MaintainabilityInfoReflection in test methods — use public API instead

1.26.1

New Rules

Rule IDCategorySeverityNotes
E128066PerformanceWarningLinear lookup inside loop creates O(n²) complexity
E128067PerformanceWarningString concatenation in loop creates O(n²) allocations
E128068PerformanceWarningSort operation inside loop creates O(n² log n) complexity
E128069PerformanceWarningList.Insert(0, ...) in loop creates O(n²) complexity
E128070ReliabilityWarningPool Rent() capacity must be bounded
E128071SecurityWarningUse a FIPS-approved hash algorithm
E128072PerformanceInfoPrefer SHA256.HashData() over SHA256.Create()
E128073TestingWarningTest method missing [Trait("Category", ...)] attribute
E128074DesignWarningReadonly struct property should use init accessor
E128075SecurityWarningUse RandomNumberGenerator instead of Random in crypto context

1.23.3

New Rules

Rule IDCategorySeverityNotes
E128055StyleWarningUnbalanced pragma warning disable — disable without matching restore
E128056ReliabilityWarningFileInfo.Exists TOCTOU race — check then read without try/catch
E128057ReliabilityWarningUnprotected cleanup in finally block — File/Directory.Delete without try/catch
E128058DesignWarningList<T> returned as IReadOnlyList<T> without .AsReadOnly()
E128059DesignErrorInterface method parameter unused in implementation
E128060DesignWarningDictionary<K,V> returned as IReadOnlyDictionary<K,V> without .AsReadOnly()
E128061DesignWarningStatic readonly array should be ImmutableArray<T>
E128062TestingWarningTest uses outdated ReferenceAssemblies — does not match project target framework
E128063StyleErrorPrivate static member name contains a mid-name underscore
E128064ReliabilityWarningDisk write-then-read round-trip — use the in-memory value instead of reading back from disk
E128065StyleWarningPragma bundling — #pragma warning disable with multiple IDs; use one pragma per ID

1.8.0

New Rules

Rule IDCategorySeverityNotes
E128054TestingWarningClass creates temp directory without cleanup interface

Changed Rules

Rule IDNew CategoryNew SeverityOld CategoryOld SeverityNotes
E128003DesignWarningReliabilityWarningRecategorized to match Design/ directory
E128004DesignWarningReliabilityWarningRecategorized to match Design/ directory

1.6.0

New Rules

Rule IDCategorySeverityNotes
E128031ReliabilityWarningAddSingleton factory returns IDisposable
E128032DesignWarningConcrete-only DI registration with available interface
E128033ReliabilityWarningOptions class bound via .Bind() has init-only property
E128034ReliabilityWarningConstructor news a DI-registered type
E128035ReliabilityWarningConcrete-type DI dependency without direct registration
E128036DesignWarningTask.Run wrapping async lambda — unnecessary thread pool hop
E128037ReliabilityWarningUnbounded Task.WhenAll over async Select
E128038ReliabilityWarningTask.WhenAll async lambda missing CancellationToken propagation
E128039ReliabilityWarningCatch filter must exclude OperationCanceledException
E128040ReliabilityWarningConcurrency limit must be positive
E128041ReliabilityWarningJsonDocument.RootElement must not escape the document’s using scope
E128042DesignWarningConvert.ToInt32/ToInt64 wrapping ExecuteScalar without null guard
E128043StyleWarningDo not use the null-forgiving operator
E128044DesignWarningType implements IAsyncDisposable but not IDisposable
E128045DesignWarningAvoid direct System.Console usage
E128046DesignWarningClass has excessive user-defined inheritance depth
E128047StyleWarning#pragma warning disable without justification comment
E128048DesignWarningUse switch instead of if/else-if chain on enum values
E128049DesignWarningAvoid [DynamicallyAccessedMembers] attribute
E128050DesignErrorUse TimeSpan for duration values
E128051ReliabilityWarningHttpClient missing OperationCanceledException catch
E128052DesignInfoMutable collection on public API
E128053DesignWarningCollection-of-string path parameter

1.5.0

New Rules

Rule IDCategorySeverityNotes
E128027PerformanceWarningUse FrozenSet/FrozenDictionary for static readonly collections
E128028ReliabilityWarningTask.FromResult wraps sync I/O that has an async alternative
E128029PerformanceWarningReplace multi-string OR-chain with HashSet.Contains
E128030DesignInfoDo not compare FileSystemInfo types by reference

1.4.0

New Rules

Rule IDCategorySeverityNotes
E128019DesignWarningDo not pass CancellationToken by ‘in’ reference
E128020ReliabilityWarningDo not use ‘in’ modifier with mutable structs
E128021DesignErrorDo not use ‘in’ modifier with ref struct parameters
E128022DesignWarningRemove ConfigureAwait(false) in application code
E128023ReliabilityWarningAvoid hardcoded /tmp path — use Path.GetTempPath()
E128024StyleWarningNon-XML-doc comment above method declaration
E128025StyleWarningGuid.NewGuid() used in temp file path — use GetRandomFileName
E128026PerformanceWarningRedundant HashSet allocation in FrozenSet creation

1.3.5

New Rules

Rule IDCategorySeverityNotes
E128015PerformanceWarningUse string interpolation instead of string.Format
E128016ReliabilityWarningDateTime.Parse/ParseExact missing DateTimeStyles parameter
E128017DesignWarningUse primary constructor parameter directly
E128018PerformanceWarningUse ToArray() instead of ToList() for read-only foreach iteration

1.3.0

New Rules

Rule IDCategorySeverityNotes
E128011ReliabilityWarning[GeneratedRegex] attribute is missing matchTimeoutMilliseconds
E128012ReliabilityWarningRegexOptions.Compiled is redundant in [GeneratedRegex]
E128013ReliabilityWarning[GeneratedRegex] pattern has overlapping quantifiers
E128014ReliabilityWarning[GeneratedRegex] pattern has nested quantifiers

1.2.0

New Rules

Rule IDCategorySeverityNotes
E128009PerformanceWarningUse MinBy/MaxBy instead of OrderBy().First()
E128010PerformanceWarningHttpClient call missing HttpCompletionOption.ResponseHeadersRead

1.1.0

New Rules

Rule IDCategorySeverityNotes
E128006StyleWarningUse Encoding.UTF8 instead of Encoding.Default
E128007DesignWarningAvoid async void methods (non-event-handler)
E128008DesignWarningAvoid sync-over-async (.Result / .GetAwaiter().GetResult())

1.0.0

New Rules

Rule IDCategorySeverityNotes
E128001DesignWarningUse FileInfo or DirectoryInfo instead of string for file system paths
E128002StyleWarningUse string.Empty instead of “”
E128003ReliabilityWarningUse TimeProvider instead of DateTime/DateTimeOffset direct access
E128004ReliabilityWarningUse IHttpClientFactory instead of new HttpClient()
E128005DesignWarningSeal classes that have no subclasses