Skip to content

Improve formatting of methods with generics #997

@sander1095

Description

@sander1095

Hi!

I've written the following code which I find to be very readable:

[HttpGet("dosinglanes")]
public async Task<ActionResult<IReadOnlyCollection<GetProductListResponseModel>>> GetProductsOnDosingLanes()
{
    await Task.CompletedTask;
    return Ok();
}

However, csharpier turns this into the following:

[HttpGet("dosinglanes")]
public async Task<
    ActionResult<IReadOnlyCollection<GetProductListResponseModel[]>>
> GetProductsOnDosingLanes()
{
    await Task.CompletedTask;
    return Ok();
}

Which I find to be very unreadable. The > GetProductsOnDosingLanes() is a very.. unique way of formatting this code.

I would like Csharpier to keep the code as is. What are your thoughts on this?
I could simply add a // csharpier-ignore, but I don't think this code should be formatted :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions