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

```c# class ClassName { void MethodName() { foreach ( var file in new DirectoryInfo( @"C:\Projects\csharpier-repos" ).GetFilesssssssssssssssssss() ) { return; } } } // should be class ClassName { void MethodName()...

type:bug
area:formatting
priority:low

```c# Diagnostic.Create( _descriptor, symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()? .GetSyntax() .GetLocation() ?? Location.None, symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat) ); // should maybe be Diagnostic.Create( _descriptor, symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()? .GetSyntax() .GetLocation() ?? Location.None, symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat) ); ```

type:bug
area:formatting
priority:low

When there are enough chained assignments, things break like this. ```c# storedArguments_______[i] = localVariables[i] = localVariables[i] = Expression.Parameter(parameters[i].ParameterType); ``` But when there aren't enough, you can end up like this...

type:bug
area:formatting
priority:low

This is the current set of edge cases for fields with lambdas. Right now they aren't very consistent. ```c# private Func SomeFieldFunc = (someValue) => true; private Func SomeFieldFunc =...

area:formatting
priority:low

We have logic that keeps the right side of a binary expression on the same line as the left side. There are cases where we don't really want this to...

area:formatting
priority:low

In the given code, the `,` cannot be outside the `#if`. This leads to it being formatted like so. Can we catch this and avoid breaking after the `,`? ```c#...

type:bug
area:formatting
priority:low

A side effect of https://github.com/belav/csharpier/issues/22 is that now extra lines are kept in situations where we would probably want to get rid of them. ```c# public // random comment //...

type:bug
area:formatting
priority:low

I feel like we could clean up how this breaks ```c# entity.HasKey( e => new { e.BusinessEntityID, e.PersonID, e.ContactTypeID } ); // could instead be something like entity.HasKey(e => new...

type:bug
area:formatting
priority:low

This is currently how it breaks. ```c# type.FieldDefinitionList = new List< CFieldDefinitionDTO____________________________________ > { field }; ``` Maybe it should space brace? Like this? ```c# type.FieldDefinitionList = new List< CFieldDefinitionDTO____________________________________...

type:bug
area:formatting
priority:low

```c# var query = _context.Products #if OLD_FROM_SQL .FromSql(sql) #else .FromSqlRaw(sql) #endif

type:bug
area:formatting
priority:low