CHANGELOG
July 3, 2026 ยท View on GitHub
https://keepachangelog.com/en/1.0.0/
[1.33.3] - 2026-07-03
SwitchIsMissingDefaultLabel: No longer flagsboolswitches where bothtrueandfalseare covered, or pattern-matching switches on type hierarchies
[1.33.2] - 2026-06-29
GetHashCodeRefersToMutableMember: No longer flagsreadonlyfields of typeSystem.Tuple<...>sinceTupleis an immutable reference typeCollectionManipulatedDuringTraversal: No longer flags modifications insidefor/foreachloops when the modification is immediately followed by areturnorbreakstatementParameterAssignedInConstructor: No longer flags parameter reassignment when the parameter is subsequently assigned to a field or property in the same constructor (normalization pattern)
[1.33.1] - 2026-04-11
UnnecessaryEnumerableMaterialization: No longer flagsToHashSet()as an unnecessary materialization since it performs deduplicationLinqTraversalBeforeFilter: No longer flagsReverse(),Take(),TakeLast(), orTakeWhile()beforeWhere()since reordering would change semantics
[1.33.0] - 2026-03-15
TimeSpanConstructedWithTicks: Detectnew TimeSpan(value)with a single argument, which creates ticks (100ns) instead of secondsUnboundedStackalloc: No longer triggers when thestackallocis inside a ternary expression with a heap allocation fallbackStructWithoutElementaryMethodsOverridden: Turned off by defaultDivideIntegerByInteger: Set toInfoby defaultHttpClientInstantiatedDirectly: No longer triggers in test classes (xUnit, NUnit, MSTest)DateTimeNow: Set toInfoby defaultSwitchIsMissingDefaultLabel: Set toInfoby defaultSwitchDoesNotHandleAllEnumOptions: Set toInfoby defaultAttributeMustSpecifyAttributeUsage: No longer triggers onabstractattribute base classesDisposeAsyncDisposable: No longer triggers when the containing method is not asyncTestMethodWithoutTestAttribute: No longer flags property accessors as potential test methods
[1.32.0] - 2026-03-14
RedisResponseNotHandled: Detect when Redis response objects are discarded without checking for errorsActivityWasNotStopped: Fixed a false positive when the activity is directly returned from a methodDisposableFieldIsNotDisposed: Disposable fields that belong to a type now trigger when they are not included in any reachable disposal pathDisposeAsyncDisposable: Detects asynchronously disposable concrete types even when the local is declared as an interface or base typeSwitchDoesNotHandleAllEnumOptions: Now analyzesswitchexpressions as well asswitchstatementsSwitchIsMissingDefaultLabel: Now analyzesswitchexpressions and requires a discard arm as the default caseParameterAssignedInConstructor: Now also detects suspicious assignments fromthis.-qualified fields and propertiesTestMethodWithoutPublicModifier:internalmethods with xUnit no longer trigger thisTestMethodWithoutPublicModifier: Parameterized test attributes such asNUnit.TestCaseandMSTest.DataTestMethodare now recognizedTestMethodWithoutTestAttribute: NUnit classes can now be recognized through sibling[Test]methods even when[TestFixture]is omittedRecursiveOperatorOverload: Fixed a false positive when a different overload is selected
[1.31.1] - 2026-01-25
MultipleFromBodyParameters: Support Minimal Web APIs (lambda expressions)
[1.31.0] - 2026-01-24
LoggerMessageAttribute: This analyzer suggests converting regular logging calls to the source-generated logging pattern.
[1.30.0] - 2026-01-23
StringConcatenatedInLoop: Now also catches interpolated stringsStringPlaceholdersInWrongOrder: Retains existing whitespace when applying the code fixLinqTraversalBeforeFilter: Implemented a code fix to swap the traversal and filter callsComparingStringsWithoutStringComparison: Supports null-conditional access, e.g.myString?.ToLower() == otherString?.ToLower()UnnecessaryToStringOnSpan: ASpan<char>orReadOnlySpan<char>was converted to astringusing.ToString()when an overload accepting a(ReadOnly)Span<char>exists. Use that overload instead to avoid unnecessary allocations.
[1.29.0] - 2026-01-22
- Fixed an ignored test
MultipleOrderByCalls_MultipleOrderByChained ActivityWasNotStopped: AnActivitywas started but is not being stopped or disposedFlagsEnumValuesAreNotPowersOfTwo: Trigger on enums that use binary expressions in member valuesValueTaskAwaitedMultipleTimes: AValueTaskwas awaited multiple times, which leads to undefined behavior
[1.28.0] - 2026-01-21
ImmutableCollectionCreatedIncorrectly:ImmutableArrayis being created using 'new' instead of theCreatemethod
[1.27.1] - 2025-02-22
TestMethodWithoutTestAttribute: Don't trigger whenNUnit.TestCaseorNUnit.TestCaseSourceis present on a method
[1.27.0] - 2025-01-09
ElementaryMethodsOfTypeInCollectionNotOverridden: Don't exclude allSystemassembly types, exclude only structs
[1.26.0] - 2024-12-18
ElementaryMethodsOfTypeInCollectionNotOverridden: Include.Distinct()and.ToHashSet(), courtesy of @Advitalitum
[1.25.2] - 2024-09-15
ConcurrentDictionaryEmptyCheck: Correctly constrain the LINQ methods toConcurrentDictionary
[1.25.1] - 2024-09-15
- Reverted an earlier dependency bump which caused the analyzers to become incompatible with Visual Studio
[1.25.0] - 2024-09-15
ConcurrentDictionaryEmptyCheck: AConcurrentDictionaryis checked for emptiness without using.IsEmpty
[1.24.1] - 2024-09-10
EnumWithoutDefaultValue: No longer crashes when using an enum that is notint, courtesy of @Genbox
[1.24.0] - 2024-02-20
- All analysers will no longer report diagnostics in generated code
[1.23.4] - 2024-01-04
UnnecessaryEnumerableMaterialization: If the instance is of typeIQueryablethen the analyzer will no longer trigger
[1.23.3] - 2023-05-15
GetHashCodeRefersToMutableMember: No longer triggers oninitproperty setters
[1.23.2] - 2023-03-18
AsyncOverloadsAvailable: Will no longer pass through theCancellationTokenif it's inside a static local functionAsyncOverloadsAvailable: Will correctly identify overloads if the synchronous variant returns aTask-like type
[1.23.1] - 2023-02-28
StringConcatenatedInLoop: No longer triggers a warning if the string is retrieved through an indexer (e.g.myList[i])DisposeAsyncDisposable: Preserves leading and trailing trivia when the code fix is appliedTestMethodWithoutTestAttribute: Will no longer consider methods withTask<T>andValueTask<T>return types as potential test methods
[1.23.0] - 2023-02-26
DisposeAsyncDisposable: An object implementsIAsyncDisposableand can be disposed of asynchronously in the context it is usedPointlessCollectionToString:ImmutableDictionaryis also includedTestMethodWithoutTestAttribute: Reduced false negatives by extending the diagnostic to methods that have certain attributes (Xunit.ClassData,Xunit.InlineData,Microsoft.DataRow,NUnit.TestCase,NUnit.TestCaseSource)
[1.22.2] - 2023-02-25
ComparingStringsWithoutStringComparison: Don't trigger when the same symbol is referenced in both operandsSwitchDoesNotHandleAllEnumOptions: When adefaultclause is present, the analyzer will become an INFO diagnostic rather than a WARN
[1.22.1] - 2023-02-21
ThreadSleepInAsyncMethod: Fixed aNullReferenceExceptionif symbols weren't loaded
[1.22.0] - 2023-02-20
StringConcatenatedInLoop: No longer triggers if concatenation is immediately followed by areturnorbreakclauseAsyncOverloadsAvailable: Doesn't trigger inside a synchronous local functionSynchronousTaskWait: Now also supports anonymous functionsThreadSleepInAsyncMethod: Now also supports anonymous functions
[1.21.6] - 2023-02-10
StructWithoutElementaryMethodsOverridden: Generates anEquals(object? o)method when nullable reference types are enabledEqualsAndGetHashcodeNotImplementedTogether: Generates anEquals(object? o)method when nullable reference types are enabled
[1.21.5] - 2023-01-31
StringConcatenatedInLoop: Assignments without a concatenation referencing the assigned field won't trigger a warningStaticInitializerAccessedBeforeInitialization: No longer triggers if the referenced symbol is used an argument to a method callSwitchIsMissingDefaultLabel: Restricted the IDE warning to theswitchvalue instead of the entire statementEqualsAndGetHashcodeNotImplementedTogether,RethrowExceptionWithoutLosingStacktraceandStringPlaceHoldersInWrongOrder: Minor improvements to code fixes to return individual documents instead of a solution
[1.21.4] - 2023-01-29
StringConcatenatedInLoop: Concatenations inside object creation expressions no longer trigger a warningStringConcatenatedInLoop: Does not trigger when assigning to the loop variableUnnecessaryEnumerableMaterialization: Now correctly parses the two subsequent invocations, avoiding issues when they are nested within a method call themselvesSwitchDoesNotHandleAllEnumOptions: Code Fix generates more predictable code when simplification is possibleSwitchDoesNotHandleAllEnumOptions: Performance of Code Fix has been improved
[1.21.3] - 2023-01-25
LoopedRandomInstantiation: No longer triggers when a seed is passed to the constructorRecursiveOperatorOverload: No longer triggers multiple identical warnings if the operator is invoked multiple times in the bodyExceptionThrownFromProhibitedContext,StaticInitializerAccessedBeforeInitialization,SynchronousTaskWait,UnusedResultOnImmutableObject,GetHashCodeRefersToMutableMember,RecursiveOperatorOverload,StringDotFormatWithDifferentAmountOfArgumentsandEnumWithoutDefaultValuetests useVerifyCS
[1.21.2] - 2023-01-23
AsyncOverloadsAvailable: Correctly generate the fixed code when conditional access is used, i.e.writer?.Write()ElementaryMethodsOfTypeInCollectionNotOverridden: Now takes overrides in base types into considerationParameterAssignedInConstructor: Don't trigger when the referenced member is a constantStringPlaceholdersInWrongOrder: Code fix generates correct code when there are more than 10 placeholders in the format stringUnboundedStackalloc: Does not trigger when using pointers, e.g.int*ThreadSleepInAsyncMethod: Fixed a rare scenario in which an empty code fix would be offeredElementaryMethodsOfTypeInCollectionNotOverridden,LoopedRandomInstantiation,OnPropertyChangedWithoutNameOfOperatorandStringPlaceholdersInWrongOrdertests useVerifyCS
[1.21.1] - 2023-01-22
StringConcatenatedInLoop: No longer triggers for regular assignmentsUnnecessaryEnumerableMaterialization: Now supports conditional access, i.e.values?.ToArray().ToList()AsyncOverloadsAvailable: No longer triggers when contained within alockbodyAsyncOverloadsAvailable: Better maintains whitespace, indentation and comments when the code fix is appliedAsyncOverloadsAvailable: Improved the detection of overloads when an optionalCancellationTokenis acceptedExplicitEnumValuesandEnumWithoutDefaultValue: Downgraded from warning to info to reduce their prevalenceExceptionThrownFromProhibitedContext: No longer triggers forPlatformNotSupportedExceptionComparingStringsWithoutStringComparison: Correctly maintains trailing whitespace when the code fix is appliedStringPlaceholdersInWrongOrderandUnnecessaryEnumerableMaterialization: Rewritten to useIOperationUnnecessaryEnumerableMaterializationtests useVerifyCSLinqTraversalBeforeFilter: Fixed typo in diagnostic message
[1.21.0] - 2023-01-21
StringConcatenatedInLoop: Astringwas concatenated in a loop which introduces intermediate allocations. Consider using aStringBuilderor pre-allocatedstringinstead.LinqTraversalBeforeFilter,LockingOnDiscouragedObjectandLockingOnMutableReferenceuseVerifyCS
[1.20.0] - 2023-01-20
CollectionManipulatedDuringTraversal: A collection was modified while it was being iterated over. Make a copy first or avoid iterations while the loop is in progress to avoid anInvalidOperationExceptionexception at runtimeAccessingTaskResultWithoutAwait: Now also shows a warning when the method is notasyncbut returns aTask
[1.19.1] - 2023-01-14
PointlessCollectionToString: Supports immutable collectionsStructWithoutElementaryMethodsOverridden: No longer generates the elementary methods in both declarations if it is apartial structStructWithoutElementaryMethodsOverridden: Rewritten to useISymbolPointlessCollectionToString,ThrowNull,ExplicitEnumValues,RethrowExceptionWithoutLosingStracktrace,SwitchDoesNotHandleAllEnumOptions,ThreadSleepInAsyncMethodTests,ParameterAssignedInConstructorTests,EqualsAndGetHashcodeNotImplemented,TestMethodWithoutPublicModifier,FlagsEnumValuesAreNotPowersOfTwoTests,StructWithoutElementaryMethodsOverriddenandUnboundedStackalloctests useVerifyCS
[1.19.0] - 2023-01-12
FormReadSynchronously: Synchronously accessedHttpRequest.Formwhich uses sync-over-async. UseHttpRequest.ReadFormAsync()insteadSwitchIsMissingDefaultLabel: Rewritten usingIOperationand tests useVerifyCSNewtonsoftMixedWithSystemTextJsontests useVerifyCS
[1.18.0] - 2023-01-10
MultipleOrderByCalls: SuccessiveOrderBy()calls will maintain only the last specified sort order. UseThenBy()to combine themTestMethodWithoutTestAttribute: No longer fires for test constructorsTestMethodWithoutTestAttribute: No longer fires for overridden methodsTestMethodWithoutTestAttributetests useVerifyCS
[1.17.6] - 2023-01-08
- Switched several test files over to the
VerifyCSapproach
[1.17.5] - 2023-01-06
AsyncMethodWithVoidReturnTypewill not trigger forEventArgsfrom other frameworks such as WinUI- Code fixes that introduce
usingstatements will now take "Global Usings" into account and format theusingstatement better
[1.17.4] - 2023-01-04
AsyncOverloadsAvailable: In a chain of method calls, the code fix no longer replaces the wrong invocationComparingStringsWithoutStringComparison: No longer triggers when a culture is passed to.ToLower()or.ToUpper()ComparingStringsWithoutStringComparison: Chained method invocations are now supportedComparingStringsWithoutStringComparison: Rewritten to useIOperation
[1.17.3] - 2023-01-03
FlagsEnumValuesAreNotPowersOfTwo: Code fix now formats correctly and doesn't copy commentsHttpContextStoredInField: Only triggers if a reference toMicrosoft.AspNetCore.Http.IHttpContextAccessorexistsLockingOnMutableReference: Now includes the name of the field in the error message- Simplified
GetSyntaxRootAsynccalls in code fixes UnusedResultOnImmutableObject: Now usesIOperation
[1.17.2] - 2023-01-02
SynchronousTaskWait: Now works for top-level statementsSynchronousTaskWait: Rewritten to useIOperationSynchronousTaskWait: Preserves leading trivia when applying the code fixSynchronousTaskWait: Doesn't offer a code fix when a timeout is passed toTask.Wait(timeoutMs)ComparingStringsWithoutStringComparison: Preserves leading trivia when applying the code fixThreadSleepInAsyncMethod: Rewritten to useIOperationThreadSleepInAsyncMethod: Supportsasynclambdas
[1.17.1] - 2023-01-02
ElementaryMethodsOfTypeInCollectionNotOverridden: Fixed an issue where aNullReferenceExceptionwould be thrownHttpClientInstantiatedDirectly: Only triggers if a reference toMicrosoft.Extensions.Httpexists andIHttpClientFactoryis within scopeAsyncMethodWithVoidReturnType: Does not trigger forinterfaceandabstract classimplementationsTestMethodWithoutTestAttribute: Now excludes lifetime hooks such asXunit.IAsyncLifetimeTestMethodWithoutTestAttribute: No longer incorrectly triggers for[Fact]attributes inside astructTestMethodWithoutTestAttribute: Also accepts test methods that returnValueTaskandValueTask<T>TestMethodWithoutTestAttribute: Rewritten to useISymbol
[1.17.0] - 2023-01-01
NewtonsoftMixedWithSystemTextJson: An attempt is made to (de-)serialize an object which combinesSystem.Text.JsonandNewtonsoft.Json. Attributes from one won't be adhered to in the other and should not be mixed.
[1.16.22] - 2023-01-01
- Added
ConfigureAwait(false)to all codefixes
[1.16.21] - 2023-01-01
StaticInitializerAccessedBeforeInitialization: Doesn't trigger an error if a member with the same name but in a different type is referencedTestMethodWithoutPublicModifier: Now supports custom attributes that inherit from a test attribute
[1.16.20] - 2023-01-01
ElementaryMethodsOfTypeInCollectionNotOverridden: Fixed aNullReferenceExceptionwhen analysingexterndeclarations
[1.16.19] - 2023-01-01
AsyncOverloadsAvailableAnalyzer: Analyzer is rewritten to useIOperation
[1.16.18] - 2022-12-31
- Unit tests target .NET 7 and test framework dependencies have been updated
- Vsix build tools dependency is updated
[1.16.17] - 2022-12-30
DivideIntegerByIntegerAnalyzer: Analyzer is rewritten to useIOperationEnumWithoutDefaultValueAnalyzer: Analyzer is rewritten to useISymbolEqualsAndGetHashcodeNotImplementedTogetherAnalyzer: Analyzer is rewritten to useISymbolLockingOnDiscouragedObjectAnalyzer: Analyzer is rewritten to useIOperationLockingOnMutableReferenceAnalyzer: Analyzer is rewritten to useIOperationUnnecessaryEnumerableMaterializationAnalyzer: Use array instead of hash set for searching for small number of elements
[1.16.16] - 2022-12-30
TestMethodWithoutPublicModifier: Analyzer is rewritten to useIOperation
[1.16.15] - 2022-12-30
DateTimeNow: Correctly handles static imports
[1.16.14] - 2022-12-30
- Internal code cleanup
[1.16.13] - 2022-12-30
LinqTraversalBeforeFilter: Analyzer is rewritten to useIOperationLinqTraversalBeforeFilter: Now supports LINQ query syntax
[1.16.12] - 2022-12-30
- Project is updated to C# 11
[1.16.11] - 2022-12-30
- Simplified the implementation of all codefixes
[1.16.10] - 2022-12-30
AccessingTaskResultWithoutAwait: Analyzer is rewritten to useIOperation
[1.16.9] - 2022-12-30
InstanceFieldWithThreadStatic: Simplified theIsStaticcheck
[1.16.8] - 2022-12-30
OnPropertyChangedWithoutNameOf: Analyzer is rewritten to useIOperation
[1.16.7] - 2022-12-30
ThrowNull: Correctly triggers when a constant or castednullvalue is being thrown
[1.16.6] - 2022-12-30
ThreadStaticWithInitializerandInstanceFieldWithThreadStatic: Analyzer is rewritten to useIOperation- Removed unused test project dependencies
- Split up Test and Build workflows
[1.16.5] - 2022-12-29
DateTimeNow: No longer incorrectly triggers fornameof(DateTime.Now)invocationsPointlessCollectionToString: Correctly handles longer chains with nullable annotations, e.g.SomeClass.SomeCollection?.ToString()NewGuid,DateTimeNow,HttpClientInstantiatedDirectly,HttpContextStoredInField,ThrowNull,PointlessCollectionToString,MultipleFromBodyParameters,LoopedRandomInstantiationandElementaryMethodsOfTypeInCollectionNotOverridden: Analyzer is rewritten to useIOperation
[1.16.4] - 2022-12-29
ParameterAssignedInConstructor: Analyzer is rewritten to useIOperation
[1.16.3] - 2022-12-29
AsyncMethodWithVoidReturnTypeandAttributeMustSpecifyAttributeUsage: Analyzer is rewritten to useIOperation
[1.16.2] - 2022-12-29
SwitchDoesNotHandleAllEnumOptions: Analyzer is rewritten to useIOperation
[1.16.1] - 2022-12-28
StaticInitializerAccessedBeforeInitialization: Complete rewrite of the analyzer to useIOperation. No functional difference but might be more performant
[1.16.0] - 2022-12-27
PointlessCollectionToString:.ToString()was called on a collection which results in impractical output. Considering usingstring.Join()to display the values instead.
[1.15.0] - 2022-12-25
ThreadStaticWithInitializer: A field is marked as[ThreadStatic]so it cannot contain an initializer. The field initializer is only executed for the first thread.StaticInitializerAccessedBeforeInitialization: When a reference is part of a lambda expression we no longer incorrectly mark it as an error
[1.14.1] - 2022-10-16
AccessingTaskResultWithoutAwait: Now also works for top-level functionsAccessingTaskResultWithoutAwait: In null-conditional access scenarios such asfile?.ReadAsync().Result, invalid code will no longer be suggested by the code fix
[1.14.0] - 2022-10-16
LockingOnMutableReference: A lock was obtained on a mutable field which can lead to deadlocks when a new value is assigned. Mark the field asreadonlyto prevent re-assignment after a lock is taken.ComparingStringsWithoutStringComparison: Only suggest one code fix at a timeUnusedResultOnImmutableObject: Don't trigger for custom extension methods on thestringtype
[1.13.1] - 2022-10-1
AsyncOverloadsAvailable: Correctly suggests passing through aCancellationTokenif the sync overload accepts one as well
[1.13.0] - 2022-10-1
AsyncOverloadsAvailable: Now passes through aCancellationTokenif there is one available in the current contextAttributeMustSpecifyAttributeUsage: Takes definitions on base classes into accountElementaryMethodsOfTypeInCollectionNotOverridden: SupportsHashSet.Add()andDictionary.Add()
[1.12.0] - 2022-09-25
ParameterAssignedInConstructor: A parameter was assigned in a constructor
[1.11.2] - 2022-09-25
- Fixed an issue where in some scenarios, necessary
usingstatements were not getting added StaticInitializerAccessedBeforeInitialization: no longer triggers when passing a method reference
[1.11.1] - 2022-09-25
SwitchIsMissingDefaultLabel: code fix now works in top-level statementsAttributeMustSpecifyAttributeUsage: correctly fires when the type is defined in the netstandard assembly
[1.11.0] - 2022-09-24
ComparingStringsWithoutStringComparison: Astringis being compared through allocating a newstring, e.g. usingToLower()orToUpperInvariant(). Use a case-insensitive comparison instead which does not allocate.UnnecessaryEnumerableMaterialization: supports!.operatorElementaryMethodsOfTypeInCollectionNotOverridden: supports?.and!.operatorsStaticInitializerAccessedBeforeInitialization: no longer triggers when referencing itself
[1.10.1] - 2022-09-16
StaticInitializerAccessedBeforeInitialization: supports implicit object creation expressionsNewGuid: supports implicit object creation expressionsHttpClientInstantiatedDirectly: supports implicit object creation expressions
[1.10.0] - 2022-09-15
- All analyzers and code fixes now have help codes that link back to the individual documentation
StaticInitializerAccessedBeforeInitialization: don't trigger if the referenced field is marked asconst
[1.9.4] - 2022-09-13
StaticInitializerAccessedBeforeInitialization: no longer triggers forLazy<T>invocations when a method is passed as argument- Added documentation for all analyzers to the repo
[1.9.3] - 2022-09-12
- Internal code cleanup: all warning messages in the tests are now hardcoded
[1.9.2] - 2022-09-12
StaticInitializerAccessedBeforeInitialization: now takesnameof()usage into accountStaticInitializerAccessedBeforeInitialization: no longer triggers for invocations ofstaticfunctionsStaticInitializerAccessedBeforeInitialization: no longer triggers when the field is of typeActionorFunc
[1.9.1] - 2022-09-12
- Internal code cleanup to remove -Async suffixes on tests
[1.9.0] - 2022-09-11
LinqTraversalBeforeFilter: AnIEnumerableextension method was used to traverse the collection and subsequently filtered usingWhere(). If theWhere()filter is executed first, the traversal will have to iterate over fewer items which will result in better performance.LockingOnDiscouragedObject: Alockwas taken using an instance of a discouraged type.System.String,System.Typeandthisreferences can all lead to deadlocks and should be replaced with aSystem.Objectinstance instead.
[1.8.0] - 2022-09-08
StaticInitializerAccessedBeforeInitialization: Astaticfield relies on the value of anotherstaticfield which is defined in the same type.staticfields are initialized in order of appearance.UnboundedStackalloc: An array is stack allocated without checking whether the length is within reasonable bounds. This can result in performance degradations and security risks
[1.7.2] - 2022-09-07
AttributeMustSpecifyAttributeUsage: correctly identify when the attribute has been added so it doesn't continue suggesting the change
[1.7.1] - 2022-09-06
StructWithoutElementaryMethodsOverridden: takepartial structdefinitions into account where the methods are implemented across separate filesTestMethodWithoutTestAttribute: more accurately excludeDispose()methods
[1.7.0] - 2022-09-05
FlagsEnumValuesAreNotPowersOfTwohas been rewritten to reduce the scope of its warning. Now it will only warn if a non-negative decimal literal is found which is not a power of two. A code fix will be available if a binary OR expression can be constructed with other enum membersFlagsEnumValuesDontFitwill no longer fire as this was inaccurate and already covered by the default CA analyzersFlagsEnumValuesAreNotPowersOfTwowill now mention the enum member that triggered the violation
[1.6.0] - 2022-09-04
AttributeMustSpecifyAttributeUsage: warn when an attribute is defined without specifying the[AttributeUsage]- All internal code now uses nullable reference types
[1.5.0] - 2022-09-04
MultipleFromBodyParameters: warn when an API was defined with multiple[FromBody]parameters that attempt to deserialize the request body- Include README in nuget package
[1.4.2] - 2022-09-04
- CI will ensure the version has been updated appropriately before releasing a new package
- CI will run its
dotnet formatcheck much faster
[1.4.1] - 2022-09-03
TestMethodWithoutTestAttribute: improved the accuracy of discoveringTestClassandTestFixtureattributes
[1.4.0] - 2022-09-03
InstanceFieldWithThreadStatic: warn when[ThreadStatic]is applied to an instance field- Removed
StructShouldNotMutateSelf - Restructured the diagnostic categories into Performance, ApiDesign and Correctness
[1.3.1] - 2022-09-03
ThreadSleepInAsyncMethoddoes not suggest a no-op refactor if the method is not marked asasync
[1.3.0] - 2022-09-02
ElementaryMethodsOfTypeInCollectionNotOverriddenis more targeted and only warns if it finds an actual lookup that will be problematicExceptionThrownFromProhibitedContextdoesn't crash when encountering emptythrowstatementsExceptionThrownFromProhibitedContextdoesn't crash when encounteringthrowstatements that reference propertiesAsyncOverloadsAvailablewill no longer suggest to use an overload if that overload is the current surrounding methodAsyncOverloadsAvailablenow works inside lambda expressions as wellUnusedResultOnImmutableObjectdoesn't trigger onCopyToandTryCopyTo
[1.2.4] - 2022-08-31
- Fixed:
AsyncOverloadsAvailablesupports methods that returnValueTask - Fixed:
AccessingTaskResultWithoutAwaitsupports methods that returnValueTask - Fixed:
ThreadSleepInAsyncMethodsupports methods that returnValueTask AsyncMethodWithVoidReturnTypenow also works for top-level function declarations and local functionsThreadSleepInAsyncMethodnow also works for top-level function declarations and local functions
[1.2.3] - 2022-08-29
- Fixed:
GetHashCodeRefersToMutableMembercorrectly handlespartialclasses - Fixed:
EqualsAndGetHashcodeNotImplementedcorrectly handlespartialclasses
[1.2.2] - 2022-08-29
- Fixed:
AsyncOverloadsAvailablewraps theawaitexpression with parentheses when the function return value is accessed inline - Fixed:
AsyncOverloadsAvailableno longer suggests a change if it would result in invalid code - Fixed:
AsyncOverloadsAvailablenow also reports improvements when using top-level statements - Fixed:
AsyncOverloadsAvailabletakes nullable reference types into account when selecting an overload EqualsAndGetHashcodeNotImplementedTogethernow mentions the class name in the diagnostic message
[1.2.1] - 2022-08-29
- Fixed:
ElementaryMethodsOfTypeInCollectionNotOverriddentriggers for external types - Fixed:
ExceptionThrownFromProhibitedContextwill no longer trigger forNotSupportedExceptionandNotImplementedException - Fixed:
TestMethodWithoutTestAttributeno longer crashes when encountering arecord - Fixed:
TestMethodWithoutTestAttributeno longer triggers forDispose()methods
[1.2.0] - 2022-08-28
- Implemented
UnnecessaryEnumerableMaterialization: AnIEnumerablewas materialized before a deferred execution call SwitchDoesNotHandleAllEnumOptionsproduces more accurate code when static imports cause enum members to conflict- SharpSource its unit tests now run on .NET 6.0
[1.1.0] - 2022-08-28
- Implemented
UnusedResultOnImmutableObject: The result of an operation on an immutable object is unused
[1.0.0] - 2022-08-28
- Implemented
EnumWithoutDefaultValue: An enum should specify a default value - Changed the categories of
ExplicitEnumValues,FlagsEnumValuesAreNotPowersOfTwoandFlagsEnumValuesDontFit - Improved messaging for
DateTimeNow - Added documentation
[0.9.0] - 2022-08-26
- Implemented
HttpContextStoredInField: show a warning whenHttpContextwas stored in a field. UseIHttpContextAccessorinstead - Fixed DiagnosticID of
HttpClientInstantiatedDirectly
[0.8.0] - 2022-08-24
- Implemented
HttpClientInstantiatedDirectly: show a warning whenHttpClientis instantiated. UseIHttpClientFactoryinstead
[0.7.0] - 2022-08-23
- Implemented
ExplicitEnumValues: show a warning when an enum does not explicitly specify its value
[0.6.0] - 2022-08-15
- Automatically publish updates to Github Packages
[0.5.0] - 2022-08-15
- Automatically publish updates to the VSIX marketplace
[0.4.0] - 2022-08-08
- Don't trigger
ElementaryMethodsOfTypeInCollectionNotOverriddenfor enums - Don't trigger
ElementaryMethodsOfTypeInCollectionNotOverriddenfor arrays DateTimeNownow shows the correct code fix title action