Skip to content

Commit

Permalink
Format record braces consistently with class
Browse files Browse the repository at this point in the history
closes #233
  • Loading branch information
belav committed Jun 14, 2021
1 parent 7ed2638 commit e27f84d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ record MostlyWeeklyTemperature(

record PC(string x) : PrimaryConstructor(x) { }

public record RecordWithProperty
{
public string Property { get; set; }
}

record RecordWithoutBody(string property);

record LongerRecordNameWhatHappens_________________________________________(string x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ public static Doc Print(BaseTypeDeclarationSyntax node)
DocUtilities.RemoveInitialDoubleHardLine(members);

docs.Add(
groupId != null ? Doc.IfBreak(" ", Doc.Line, groupId) : Doc.HardLine,
groupId != null && parameterList != null
? Doc.IfBreak(" ", Doc.Line, groupId)
: Doc.HardLine,
Token.Print(node.OpenBraceToken),
members,
Doc.HardLine,
Expand Down

0 comments on commit e27f84d

Please sign in to comment.