dotnet / format

Home for the dotnet-format command
MIT License
1.91k stars 172 forks source link

Wrong indentation when using primary constructor #2165

Open aserrabi opened 3 months ago

aserrabi commented 3 months ago
using Microsoft.AspNetCore.Mvc;

namespace Web.Controllers;

[Route("test")]
public class TestController : ControllerBase
{
  private readonly ILogger<TestController> logger;

  public TestController(ILogger<TestController> logger)
  {
    this.logger = logger;
  }

  [HttpPost("test/{id}")]
  public ActionResult Test(string id)
  {
    this.logger.LogInformation("Hello {Id}", id);
    return this.Ok("Format me");
  }
}
image image