Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Roslynator.Analyzers from 4.12.0 to 4.12.3 #2643

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers" Version="4.12.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.12.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using FluentAssertions.Execution;
using Xunit;
Expand Down Expand Up @@ -351,7 +350,7 @@ public void When_strings_are_in_ascending_order_according_to_a_custom_lambda_it_
string[] strings = ["alpha", "beta", "theta"];

// Act
Action act = () => strings.Should().BeInAscendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()));
Action act = () => strings.Should().BeInAscendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]));

// Assert
act.Should().NotThrow();
Expand All @@ -365,7 +364,7 @@ public void When_strings_are_not_in_ascending_order_according_to_a_custom_lambda

// Act
Action act = () =>
strings.Should().BeInAscendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()), "of {0}", "reasons");
strings.Should().BeInAscendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]), "of {0}", "reasons");

// Assert
act.Should()
Expand Down Expand Up @@ -761,7 +760,7 @@ public void When_strings_are_not_in_ascending_order_according_to_a_custom_lambda
string[] strings = ["roy", "dennis", "thomas"];

// Act
Action act = () => strings.Should().NotBeInAscendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()));
Action act = () => strings.Should().NotBeInAscendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]));

// Assert
act.Should().NotThrow();
Expand All @@ -775,7 +774,7 @@ public void When_strings_are_unexpectedly_in_ascending_order_according_to_a_cust

// Act
Action act = () =>
strings.Should().NotBeInAscendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()), "of {0}", "reasons");
strings.Should().NotBeInAscendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]), "of {0}", "reasons");

// Assert
act.Should()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
using Xunit.Sdk;

Expand Down Expand Up @@ -263,7 +262,7 @@ public void When_strings_are_in_descending_order_based_on_a_custom_lambda_it_sho
string[] strings = ["roy", "dennis", "barbara"];

// Act
Action act = () => strings.Should().BeInDescendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()));
Action act = () => strings.Should().BeInDescendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]));

// Assert
act.Should().NotThrow();
Expand All @@ -277,7 +276,7 @@ public void When_strings_are_not_in_descending_order_based_on_a_custom_lambda_it

// Act
Action act = () =>
strings.Should().BeInDescendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()), "of {0}", "reasons");
strings.Should().BeInDescendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]), "of {0}", "reasons");

// Assert
act.Should()
Expand Down Expand Up @@ -572,7 +571,7 @@ public void When_strings_are_not_in_descending_order_based_on_a_custom_lambda_it
string[] strings = ["dennis", "roy", "barbara"];

// Act
Action act = () => strings.Should().NotBeInDescendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()));
Action act = () => strings.Should().NotBeInDescendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]));

// Assert
act.Should().NotThrow();
Expand All @@ -586,7 +585,7 @@ public void When_strings_are_unexpectedly_in_descending_order_based_on_a_custom_

// Act
Action act = () =>
strings.Should().NotBeInDescendingOrder((sut, exp) => sut.Last().CompareTo(exp.Last()), "of {0}", "reasons");
strings.Should().NotBeInDescendingOrder((sut, exp) => sut[^1].CompareTo(exp[^1]), "of {0}", "reasons");

// Assert
act.Should()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private class ByLastCharacterComparer : IComparer<string>
{
public int Compare(string x, string y)
{
return x.Last().CompareTo(y.Last());
return x[^1].CompareTo(y[^1]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/FluentAssertions.Specs/Events/EventAssertionSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public void When_constraints_are_specified_it_should_filter_the_events_based_on_

recording
.Should().ContainSingle("because we were expecting a specific property change")
.Which.Parameters.Last().Should().BeOfType<PropertyChangedEventArgs>()
.Which.Parameters[^1].Should().BeOfType<PropertyChangedEventArgs>()
.Which.PropertyName.Should().Be("Boo");
}

Expand Down