Skip to content

Releases: Vannevelj/SharpSource

1.33.1

11 Apr 15:30
c453d47

Choose a tag to compare

  • UnnecessaryEnumerableMaterialization: No longer flags ToHashSet() as an unnecessary materialization since it performs deduplication
  • LinqTraversalBeforeFilter: No longer flags Reverse(), Take(), TakeLast(), or TakeWhile() before Where() since reordering would change semantics

1.33.0

15 Mar 22:32
a50290f

Choose a tag to compare

  • TimeSpanConstructedWithTicks: Detect new TimeSpan(value) with a single argument, which creates ticks (100ns) instead of seconds
  • UnboundedStackalloc: No longer triggers when the stackalloc is inside a ternary expression with a heap allocation fallback
  • StructWithoutElementaryMethodsOverridden: Turned off by default
  • DivideIntegerByInteger: Set to Info by default
  • HttpClientInstantiatedDirectly: No longer triggers in test classes (xUnit, NUnit, MSTest)
  • DateTimeNow: Set to Info by default
  • SwitchIsMissingDefaultLabel: Set to Info by default
  • SwitchDoesNotHandleAllEnumOptions: Set to Info by default
  • AttributeMustSpecifyAttributeUsage: No longer triggers on abstract attribute base classes
  • DisposeAsyncDisposable: No longer triggers when the containing method is not async
  • TestMethodWithoutTestAttribute: No longer flags property accessors as potential test methods

1.32.0

14 Mar 16:49
e639712

Choose a tag to compare

  • RedisResponseNotHandled: Detect when Redis response objects are discarded without checking for errors
  • ActivityWasNotStopped: Fixed a false positive when the activity is directly returned from a method
  • DisposableFieldIsNotDisposed: Disposable fields that belong to a type now trigger when they are not included in any reachable disposal path
  • DisposeAsyncDisposable: Detects asynchronously disposable concrete types even when the local is declared as an interface or base type
  • SwitchDoesNotHandleAllEnumOptions: Now analyzes switch expressions as well as switch statements
  • SwitchIsMissingDefaultLabel: Now analyzes switch expressions and requires a discard arm as the default case
  • ParameterAssignedInConstructor: Now also detects suspicious assignments from this.-qualified fields and properties
  • TestMethodWithoutPublicModifier: internal methods with xUnit no longer trigger this
  • TestMethodWithoutPublicModifier: Parameterized test attributes such as NUnit.TestCase and MSTest.DataTestMethod are now recognized
  • TestMethodWithoutTestAttribute: NUnit classes can now be recognized through sibling [Test] methods even when [TestFixture] is omitted
  • RecursiveOperatorOverload: Fixed a false positive when a different overload is selected

1.31.1

25 Jan 00:55
d99b842

Choose a tag to compare

  • MultipleFromBodyParameters: Support Minimal Web APIs (lambda expressions)

1.31.0

24 Jan 02:16
ce1afeb

Choose a tag to compare

  • LoggerMessageAttribute: This analyzer suggests converting regular logging calls to the source-generated logging pattern.

1.30.0

23 Jan 17:49
cbda72d

Choose a tag to compare

  • StringConcatenatedInLoop: Now also catches interpolated strings
  • StringPlaceholdersInWrongOrder: Retains existing whitespace when applying the code fix
  • LinqTraversalBeforeFilter: Implemented a code fix to swap the traversal and filter calls
  • ComparingStringsWithoutStringComparison: Supports null-conditional access, e.g. myString?.ToLower() == otherString?.ToLower()
  • UnnecessaryToStringOnSpan: A Span<char> or ReadOnlySpan<char> was converted to a string using .ToString() when an overload accepting a (ReadOnly)Span<char> exists. Use that overload instead to avoid unnecessary allocations.

1.29.0

22 Jan 22:55
067446b

Choose a tag to compare

  • Fixed an ignored test MultipleOrderByCalls_MultipleOrderByChained
  • ActivityWasNotStopped: An Activity was started but is not being stopped or disposed
  • FlagsEnumValuesAreNotPowersOfTwo: Trigger on enums that use binary expressions in member values
  • ValueTaskAwaitedMultipleTimes: A ValueTask was awaited multiple times, which leads to undefined behavior

1.28.0

21 Jan 00:43
2cb31d7

Choose a tag to compare

  • ImmutableCollectionCreatedIncorrectly: ImmutableArray is being created using 'new' instead of the Create method

1.27.1

22 Feb 14:23
5c923e4

Choose a tag to compare

  • TestMethodWithoutTestAttribute: Don't trigger when NUnit.TestCase or NUnit.TestCaseSource is present on a method

1.27.0

10 Jan 18:22
091c39d

Choose a tag to compare

  • ElementaryMethodsOfTypeInCollectionNotOverridden: Don't exclude all System assembly types, exclude only structs