Releases: Vannevelj/SharpSource
Releases · Vannevelj/SharpSource
1.33.1
1.33.0
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
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
MultipleFromBodyParameters: Support Minimal Web APIs (lambda expressions)
1.31.0
LoggerMessageAttribute: This analyzer suggests converting regular logging calls to the source-generated logging pattern.
1.30.0
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
- 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
ImmutableCollectionCreatedIncorrectly:ImmutableArrayis being created using 'new' instead of theCreatemethod
1.27.1
TestMethodWithoutTestAttribute: Don't trigger whenNUnit.TestCaseorNUnit.TestCaseSourceis present on a method
1.27.0
ElementaryMethodsOfTypeInCollectionNotOverridden: Don't exclude allSystemassembly types, exclude only structs