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

There are some analyzers that conflict with csharpier, it appears that it is possible to distribute a config via a nuget package that would disable them. This talks about the...

type:enhancement
priority:wishful thinking

### Discussed in https://github.com/belav/csharpier/discussions/778 Originally posted by **andrewrondeau-optirtc** December 27, 2022 Hi, apologies if this is a noob question! Do you have any documentation that **explicitly** explains the style that...

area:documentation
priority:medium

A suffix of `??` would ideally not affect the indentation of the invocations. ```c# return this.CallMethod_____________________() .CallMethod_____________________() .CallMethod_____________________(); return this.CallMethod_____________________() .CallMethod_____________________() .CallMethod_____________________() ?? string.Empty; // is formatted as return this.CallMethod_____________________()...

With how `#if` directives are formatted CSharpier will end up producing a different result depending on the condition. In other words, these two end up with different results. ```csharp CallMethod(...

type:bug
area:formatting
priority:low

``` return identityDbContext.UserRoles .Join( identityDbContext.Users, userRole => userRole.UserId, user => user.Id, (userRole, user) => new { user.UserName, userRole.RoleId } ) .Where(o => roleIds.Contains(o.RoleId)) .Select(o => o.UserName) .ToList() as IList; //...

type:bug
area:formatting
priority:medium

**Input:** ```csharp public class Obj { public string this[ [A] int X, [B, VeryLongAttributeWithSoManyArguments(123, 321)] int Y, [C, LongAttributeThatIsLong] int Y ] => X + Y + Z; public string...

**Environments** - IDE Version: Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.9.6 - Extension Version: 1.7.1 - CSharpier Version: 0.28.2 - Operating System: Windows 10 Pro - .csharpierrc...

**Input:** ```csharp public class C { [A] // moves up [B] public void A() { var z = 1; // stays here var y = 2; } } ``` **Output:**...

The current formatting of nested ternary operators ```c# var languageCode = something.IsNotBlank() ? something : otherThing.IsNotBlank() ? otherThing : thingThing.IsNotBlank() ? thingThing : "enUs"; ``` If that were to change...

closes #1220 I mostly went with how prettier works for overrides. Using a file glob, a user can specify options to be used for a file. One of those options...