Skip to content

"Failed syntax tree validation" when using dotnet csharpier . #1389

@rcdailey

Description

@rcdailey

Environments:

  • CSharpier Version:
  • Running CSharpier via:
  • Operating System:
  • .csharpierrc Settings:
  • .editorconfig Settings:

Steps to reproduce:

Run dotnet csharpier . at the root of my project.

Expected behavior:

No errors.

Actual behavior:

PS C:\code\recyclarr> dotnet csharpier .
Error ./tests/Recyclarr.Tests/Config/ConfigExtensionsTest.cs - Failed syntax tree validation.
  ----------------------------- Original: Around Line 35 -----------------------------
              new RadarrConfiguration
              {
                  InstanceName = "valid_NAME" // Comparison should be case-insensitive
              }
          };

          var invalidInstanceNames = configs.GetInvalidInstanceNames(new ConfigFilterCriteria
          {
  ----------------------------- Formatted: Around Line 0 -----------------------------
  using Recyclarr.Config;
  using Recyclarr.Config.Models;
  using Recyclarr.TrashGuide;

  namespace Recyclarr.Tests.Config;

  [TestFixture]
  public class ConfigExtensionsTest
Formatted 485 files in 617ms.

Here's the test fixture method in question:

[Test]
public void Filter_invalid_instances()
{
    var configs = new[]
    {
        new RadarrConfiguration
        {
            InstanceName = "valid_NAME", // Comparison should be case-insensitive
        },
    };

    var invalidInstanceNames = configs.GetInvalidInstanceNames(
        new ConfigFilterCriteria { Instances = ["valid_name", "invalid_name"] }
    );

    invalidInstanceNames.Should().BeEquivalentTo("invalid_name");
}

I don't know what the error means, and it doesn't appear again when I run the command a second time. I wanted to share the issue here in case it might be a bug. If it's not, please feel free to close this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions