Skip to content

Various bugs running on large codebase #203

Open
@bart-vmware

Description

@bart-vmware

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions