Skip to content

Various bugs running on large codebase #203

New issue

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

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

Already on GitHub? # to your account

Open
bart-vmware opened this issue Jul 11, 2023 · 2 comments
Open

Various bugs running on large codebase #203

bart-vmware opened this issue Jul 11, 2023 · 2 comments
Labels

Comments

@bart-vmware
Copy link

bart-vmware commented Jul 11, 2023

Description

When running this analyzer on the codebase at https://github.com/SteeltoeOSS/Steeltoe, the fixers produce code that doesn't compile in several cases. After fixing them manually, various tests start to fail.

Complete minimal example reproducing the issue

  • Clone the repo at https://github.com/SteeltoeOSS/Steeltoe
  • Add the following to /shared-test.props:
    <ItemGroup>
      <PackageReference Include="FluentAssertions.Analyzers" Version="0.21.0" PrivateAssets="All" />
    </ItemGroup>
    <ItemGroup>
      <Using Include="FluentAssertions" />
      <Using Include="Xunit" />
    </ItemGroup>
  • Set all analyzer rules of this package to Warning severity in Steeltoe.Debug.ruleset: Open src/Steeltoe.All in Visual Studio, expand the Dependencies/Analyzers/FluentAssertions.Analyzers node in project Common/Steeltoe.Common.Expression.Test, select all rules, and right-click > Set severity > Warning.
  • Rebuild the Steeltoe.Common.Expression.Test project and use the fixers to update existing Xunit tests to FluentAssertions.

Expected behavior:

No broken code and no failing tests.

Actual behavior:

Some fixers don't actually change code; others produce code that doesn't compile. Some result in test failures.

Versions

  • Which version of Fluent Assertions Analyzers are you using? v0.21.0 with FA v6.8.0
  • Which .NET runtime and version are you targeting? .NET 6

Additional Information

I only tried running on the Steeltoe.Common.Expression.Test project. Running on the complete solution may surface additional issues.

@Meir017 Meir017 added the bug label Aug 15, 2023
@Meir017
Copy link
Member

Meir017 commented Jun 19, 2024

@bart-vmware is this still an issue?

@bart-vmware
Copy link
Author

I don't know, haven't tried since. However, it should be easy to determine by checking out a commit from around that time. For example SteeltoeOSS/Steeltoe@326c0fd.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants