csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

CSharpier is an opinionated code formatter for c#.

Results 231 csharpier issues
Sort by recently updated
recently updated
newest added

I think the tool should remove redundant (duplicate or unused) `using` statements. Expected: ```cs using MyUsedHelper; ``` Actual: ```cs using MyUsedHelper; using MyUsedHelper; using MyUnusedHelper; ```

status:needs discussion

If in invocation contains two lambdas, it can look better to break it. ```c# app.UseWhen(c => c.Request.IsAjaxRequest(), o => o.UseMiddleware()); // vs app.UseWhen( c => c.Request.IsAjaxRequest(), o => o.UseMiddleware() );...

Been experiencing this on a work repo but I've been getting this: ![image](https://github.com/belav/csharpier/assets/96726264/1a75fd6d-99db-4197-86a9-687cf71278a9) on [this repro](https://github.com/HrvojeJuric/csharpier-vscode-long-repro). I have these extensions installed: ``` arcanis.vscode-zipfs bbenoist.Nix bmalehorn.shell-syntax ChakrounAnas.turbo-console-log codezombiech.gitignore charliermarsh.ruff csharpier.csharpier-vscode ctcuff.font-preview...

If you run `dotnet csharpier --write-stdout` against a file that has not changed since the last time csharpier was run, it will not return anything. This appears to be related...

The same call with or without parens ends up breaking differently. Maybe the 2nd version should be consistent with the first version, and just break before the parameter even when...

type:bug
area:formatting
priority:low

If you use Shared Projects `.shproj`, the contents are not formatted here. Although the code actually belongs to the consuming `.csproj` projects.

type:enhancement
area:msbuild

```cs public static class ImageSizeExtensions { public static int GetQuality(this ImageSize value) { switch (value) { // csharpier-ignore-start case ImageSize.Large: return 70; case ImageSize.Medium: return 80; case ImageSize.Small: return 85;...

### Discussed in https://github.com/belav/csharpier/discussions/942 Originally posted by **Tyrrrz** August 23, 2023 I'm not entirely sure if it doesn't work like this already, but judging by the fact that Rider told...

type:enhancement
area:vscode
area:vs
area:rider

Hello, It would be nice if we could enforce the curly brackets for conditions and loops. Probably, a strategy for that would be better, something like: * always => always...

status:needs discussion

Tested with 0.24.2, this can be reproduced in the playground: ```csharp // Input public class C { public void Test() { this // This is a comment .LongUglyMethod(); } }...

type:bug
area:formatting
priority:medium