Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/Formatting.Analyzers/CSharp/AccessorListAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ private static void AnalyzeAccessorList(SyntaxNodeAnalysisContext context)
DiagnosticHelpers.ReportDiagnostic(
context,
DiagnosticRules.PutFullAccessorOnItsOwnLine,
Location.Create(accessor.SyntaxTree, new TextSpan(accessor.SpanStart, 0)));

break;
Location.Create(accessor.SyntaxTree, accessor.Span));
}

token = accessor.Body?.CloseBraceToken ?? accessor.SemicolonToken;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class C
{
private string _p;

public string P { [||]get { return _p; } set { _p = value; } }
public string P { [|get { return _p; }|] [|set { _p = value; }|] }
}
", @"
class C
Expand All @@ -46,7 +46,7 @@ class C

public string P
{
get { return _p; } [||]set { _p = value; }
get { return _p; } [|set { _p = value; }|]
}
}
", @"
Expand All @@ -71,7 +71,7 @@ class C
{
private string _p;

public string P { [||]get => _p; set => _p = value; }
public string P { [|get => _p;|] [|set => _p = value;|] }
}
", @"
class C
Expand All @@ -97,7 +97,7 @@ class C

public string P
{
get => _p; [||]set => _p = value;
get => _p; [|set => _p = value;|]
}
}
", @"
Expand All @@ -122,7 +122,7 @@ class C
{
private string _p;

public string P { [||]get { return _p; } }
public string P { [|get { return _p; }|] }
}
", @"
class C
Expand All @@ -145,7 +145,7 @@ class C
{
private string _p;

public string P { [||]get => _p; }
public string P { [|get => _p;|] }
}
", @"
class C
Expand Down
Loading