Skip to content

Commit 4dd71fa

Browse files
authored
formatting with 0.30.1 (#1386)
1 parent fedc791 commit 4dd71fa

File tree

8 files changed

+90
-89
lines changed

8 files changed

+90
-89
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"csharpier": {
6-
"version": "0.29.2",
6+
"version": "0.30.1",
77
"commands": [
88
"dotnet-csharpier"
99
]

Src/CSharpier.Cli/EditorConfig/ConfigFileParser.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ internal static class ConfigFileParser
1212
// "Comment: starts with a ; or a #."
1313
private static readonly Regex CommentRegex = new("^[;#].*$");
1414

15-
private static readonly IniParserConfiguration Configuration =
16-
new()
17-
{
18-
CommentRegex = CommentRegex,
19-
AllowDuplicateKeys = true,
20-
AllowDuplicateSections = true,
21-
OverrideDuplicateKeys = true,
22-
SkipInvalidLines = true,
23-
ThrowExceptionsOnError = false,
24-
};
15+
private static readonly IniParserConfiguration Configuration = new()
16+
{
17+
CommentRegex = CommentRegex,
18+
AllowDuplicateKeys = true,
19+
AllowDuplicateSections = true,
20+
OverrideDuplicateKeys = true,
21+
SkipInvalidLines = true,
22+
ThrowExceptionsOnError = false,
23+
};
2524

2625
public static ConfigFile Parse(string filePath, IFileSystem fileSystem)
2726
{

Src/CSharpier.Cli/EditorConfig/Globber.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ namespace CSharpier.Cli.EditorConfig;
22

33
internal static class Globber
44
{
5-
private static readonly GlobMatcherOptions globOptions =
6-
new()
7-
{
8-
MatchBase = true,
9-
Dot = true,
10-
AllowWindowsPaths = true,
11-
AllowSingleBraceSets = true,
12-
};
5+
private static readonly GlobMatcherOptions globOptions = new()
6+
{
7+
MatchBase = true,
8+
Dot = true,
9+
AllowWindowsPaths = true,
10+
AllowSingleBraceSets = true,
11+
};
1312

1413
public static GlobMatcher Create(string files, string directory)
1514
{

Src/CSharpier.FakeGenerators/Ignored.cs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,22 @@ public static class Ignored
2323

2424
public static readonly Type[] Types = { typeof(TextSpan), typeof(SyntaxTree) };
2525

26-
public static readonly Dictionary<Type, string[]> PropertiesByType =
27-
new()
28-
{
29-
{ typeof(PropertyDeclarationSyntax), new[] { "semicolon" } },
30-
{ typeof(IndexerDeclarationSyntax), new[] { "semicolon" } },
31-
{ typeof(SyntaxTrivia), new[] { "token" } },
32-
{ typeof(SyntaxToken), new[] { "value", "valueText" } },
33-
{ typeof(ParameterSyntax), new[] { "exclamationExclamationToken" } },
34-
};
26+
public static readonly Dictionary<Type, string[]> PropertiesByType = new()
27+
{
28+
{ typeof(PropertyDeclarationSyntax), new[] { "semicolon" } },
29+
{ typeof(IndexerDeclarationSyntax), new[] { "semicolon" } },
30+
{ typeof(SyntaxTrivia), new[] { "token" } },
31+
{ typeof(SyntaxToken), new[] { "value", "valueText" } },
32+
{ typeof(ParameterSyntax), new[] { "exclamationExclamationToken" } },
33+
};
3534

36-
public static readonly HashSet<string> UnsupportedNodes =
37-
new()
38-
{
39-
// if new versions of c# add node types, we need to ignore them in the generators
40-
// until codeAnalysis + sdks are updated
41-
// global.json doesn't seem to always be respected for builds (namely VS but rider started having the same problem)
42-
// which causes the generators to generate code for the new node types
43-
// but then the build fails because those types don't exist in the packages the actual project references
44-
// "ListPatternSyntax", "SlicePatternSyntax"
45-
};
35+
public static readonly HashSet<string> UnsupportedNodes = new()
36+
{
37+
// if new versions of c# add node types, we need to ignore them in the generators
38+
// until codeAnalysis + sdks are updated
39+
// global.json doesn't seem to always be respected for builds (namely VS but rider started having the same problem)
40+
// which causes the generators to generate code for the new node types
41+
// but then the build fails because those types don't exist in the packages the actual project references
42+
// "ListPatternSyntax", "SlicePatternSyntax"
43+
};
4644
}

Src/CSharpier.Tests/MissingTypeChecker.cs

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -70,49 +70,48 @@ public void Ensure_There_Are_No_Missing_Types()
7070
missingTypes.Should().BeEmpty();
7171
}
7272

73-
private readonly HashSet<string> ignored =
74-
new()
75-
{
76-
"AccessorDeclarationSyntax",
77-
"AccessorListSyntax",
78-
"AttributeArgumentListSyntax",
79-
"AttributeArgumentSyntax",
80-
"AttributeSyntax",
81-
"AttributeTargetSpecifierSyntax",
82-
"BaseListSyntax",
83-
"CatchDeclarationSyntax",
84-
"CatchFilterClauseSyntax",
85-
"ConstructorInitializerSyntax",
86-
"ConversionOperatorMemberCrefSyntax",
87-
"CrefBracketedParameterListSyntax",
88-
"CrefParameterListSyntax",
89-
"CrefParameterSyntax",
90-
"ExplicitInterfaceSpecifierSyntax",
91-
"FunctionPointerCallingConventionSyntax",
92-
"FunctionPointerParameterListSyntax",
93-
"FunctionPointerParameterSyntax",
94-
"FunctionPointerUnmanagedCallingConventionListSyntax",
95-
"FunctionPointerUnmanagedCallingConventionSyntax",
96-
"IndexerMemberCrefSyntax",
97-
"InterpolationAlignmentClauseSyntax",
98-
"InterpolationFormatClauseSyntax",
99-
"JoinIntoClauseSyntax",
100-
"LineDirectivePositionSyntax",
101-
"NameMemberCrefSyntax",
102-
"OperatorMemberCrefSyntax",
103-
"OrderingSyntax",
104-
"PositionalPatternClauseSyntax",
105-
"PropertyPatternClauseSyntax",
106-
"QualifiedCrefSyntax",
107-
"SubpatternSyntax",
108-
"SwitchExpressionArmSyntax",
109-
"TypeCrefSyntax",
110-
"XmlCrefAttributeSyntax",
111-
"XmlElementEndTagSyntax",
112-
"XmlElementStartTagSyntax",
113-
"XmlNameAttributeSyntax",
114-
"XmlNameSyntax",
115-
"XmlPrefixSyntax",
116-
"XmlTextAttributeSyntax",
117-
};
73+
private readonly HashSet<string> ignored = new()
74+
{
75+
"AccessorDeclarationSyntax",
76+
"AccessorListSyntax",
77+
"AttributeArgumentListSyntax",
78+
"AttributeArgumentSyntax",
79+
"AttributeSyntax",
80+
"AttributeTargetSpecifierSyntax",
81+
"BaseListSyntax",
82+
"CatchDeclarationSyntax",
83+
"CatchFilterClauseSyntax",
84+
"ConstructorInitializerSyntax",
85+
"ConversionOperatorMemberCrefSyntax",
86+
"CrefBracketedParameterListSyntax",
87+
"CrefParameterListSyntax",
88+
"CrefParameterSyntax",
89+
"ExplicitInterfaceSpecifierSyntax",
90+
"FunctionPointerCallingConventionSyntax",
91+
"FunctionPointerParameterListSyntax",
92+
"FunctionPointerParameterSyntax",
93+
"FunctionPointerUnmanagedCallingConventionListSyntax",
94+
"FunctionPointerUnmanagedCallingConventionSyntax",
95+
"IndexerMemberCrefSyntax",
96+
"InterpolationAlignmentClauseSyntax",
97+
"InterpolationFormatClauseSyntax",
98+
"JoinIntoClauseSyntax",
99+
"LineDirectivePositionSyntax",
100+
"NameMemberCrefSyntax",
101+
"OperatorMemberCrefSyntax",
102+
"OrderingSyntax",
103+
"PositionalPatternClauseSyntax",
104+
"PropertyPatternClauseSyntax",
105+
"QualifiedCrefSyntax",
106+
"SubpatternSyntax",
107+
"SwitchExpressionArmSyntax",
108+
"TypeCrefSyntax",
109+
"XmlCrefAttributeSyntax",
110+
"XmlElementEndTagSyntax",
111+
"XmlElementStartTagSyntax",
112+
"XmlNameAttributeSyntax",
113+
"XmlNameSyntax",
114+
"XmlPrefixSyntax",
115+
"XmlTextAttributeSyntax",
116+
};
118117
}

Src/CSharpier.VisualStudio/CSharpier.VisualStudioShared/CSharpierOptions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ protected void LoadFrom(CSharpierOptions newInstance)
5555
this.DisableCSharpierServer = newInstance.DisableCSharpierServer;
5656
}
5757

58-
private static readonly AsyncLazy<CSharpierOptions> liveModel =
59-
new(CreateAsync, ThreadHelper.JoinableTaskFactory);
58+
private static readonly AsyncLazy<CSharpierOptions> liveModel = new(
59+
CreateAsync,
60+
ThreadHelper.JoinableTaskFactory
61+
);
6062

6163
private static FileSystemWatcher _hotReloadWatcher;
6264

Src/CSharpier/DocTypes/Doc.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ public static implicit operator Doc(string value)
2929

3030
public static readonly HardLine HardLineIfNoPreviousLine = new(true);
3131

32-
public static readonly HardLine HardLineIfNoPreviousLineSkipBreakIfFirstInGroup =
33-
new(true, true);
32+
public static readonly HardLine HardLineIfNoPreviousLineSkipBreakIfFirstInGroup = new(
33+
true,
34+
true
35+
);
3436

3537
public static readonly LiteralLine LiteralLine = new();
3638

Src/CSharpier/Formatters/CSharp/PreprocessorSymbols.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ internal class PreprocessorSymbols : CSharpSyntaxWalker
44
{
55
private readonly List<string[]> symbolSets = new();
66
private readonly HashSet<string> squashedSymbolSets = new();
7-
private SymbolContext CurrentContext =
8-
new() { ParentContext = new SymbolContext { ParentContext = null! } };
7+
private SymbolContext CurrentContext = new()
8+
{
9+
ParentContext = new SymbolContext { ParentContext = null! },
10+
};
911

1012
private PreprocessorSymbols()
1113
: base(SyntaxWalkerDepth.Trivia) { }

0 commit comments

Comments
 (0)