Skip to content

Commit 03db400

Browse files
committed
Code formatting
1 parent 14a2aa5 commit 03db400

26 files changed

+417
-337
lines changed

.editorconfig

+33
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,36 @@
22

33
# Default severity for all analyzer diagnostics
44
dotnet_analyzer_diagnostic.severity = none
5+
6+
[*]
7+
8+
# Microsoft .NET properties
9+
csharp_new_line_before_members_in_object_initializers = false
10+
csharp_preferred_modifier_order = internal, public, private, protected, file, new, static, override, abstract, sealed, virtual, async, extern, unsafe, volatile, readonly, required:suggestion
11+
csharp_preserve_single_line_blocks = true
12+
13+
# ReSharper properties
14+
resharper_accessor_owner_body = accessors_with_expression_body
15+
resharper_blank_lines_around_block_case_section = 1
16+
resharper_braces_for_foreach = required
17+
resharper_braces_for_ifelse = not_required
18+
resharper_braces_for_while = required
19+
resharper_braces_redundant = false
20+
resharper_csharp_keep_blank_lines_in_code = 100
21+
resharper_csharp_keep_blank_lines_in_declarations = 100
22+
resharper_csharp_keep_existing_enum_arrangement = false
23+
resharper_csharp_max_line_length = 199
24+
resharper_csharp_remove_blank_lines_near_braces_in_declarations = false
25+
resharper_indent_preprocessor_other = do_not_change
26+
resharper_instance_members_qualify_declared_in =
27+
resharper_keep_existing_declaration_block_arrangement = false
28+
resharper_parentheses_redundancy_style = remove
29+
resharper_place_accessorholder_attribute_on_same_line = true
30+
resharper_place_expr_accessor_on_single_line = true
31+
resharper_place_expr_property_on_single_line = true
32+
resharper_place_simple_initializer_on_single_line = false
33+
resharper_space_within_empty_braces = false
34+
resharper_wrap_before_binary_pattern_op = false
35+
resharper_wrap_chained_binary_patterns = chop_if_long
36+
resharper_wrap_list_pattern = chop_if_long
37+
resharper_wrap_object_and_collection_initializer_style = chop_always
+18-18
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
99

10-
<ItemGroup>
11-
<PackageReference Include="LibGit2Sharp" Version="0.30.0" />
12-
</ItemGroup>
10+
<ItemGroup>
11+
<PackageReference Include="LibGit2Sharp" Version="0.30.0"/>
12+
</ItemGroup>
1313

14-
<ItemGroup>
15-
<ProjectReference Include="..\CodeParser\CodeParser.csproj" />
16-
<ProjectReference Include="..\Contracts\Contracts.csproj" />
17-
</ItemGroup>
14+
<ItemGroup>
15+
<ProjectReference Include="..\CodeParser\CodeParser.csproj"/>
16+
<ProjectReference Include="..\Contracts\Contracts.csproj"/>
17+
</ItemGroup>
1818

19-
<ItemGroup>
20-
<None Update="Repositories.txt">
21-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
22-
</None>
23-
</ItemGroup>
19+
<ItemGroup>
20+
<None Update="Repositories.txt">
21+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
22+
</None>
23+
</ItemGroup>
2424

2525
</Project>

ApprovalTestTool/Program.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ namespace ApprovalTestTool;
88
internal class TestTool
99
{
1010
/// <summary>
11-
/// Automatic approval tool
12-
/// For each line in the repositories.txt
11+
/// Automatic approval tool
12+
/// For each line in the repositories.txt
1313
/// 1. Clone or pull the repository
1414
/// 2. Checkout the specified commit
1515
/// 3. Run test code: Parse the solution and write the output to a file.
1616
/// 4. Compare output with reference or copy to reference folder if not exists yet.
1717
/// 5. Print test result
18-
///
19-
/// Note: The reference files are not committed, so save space.
20-
/// You can always check out an older tag and create the reference files.
18+
/// Note: The reference files are not committed, so save space.
19+
/// You can always check out an older tag and create the reference files.
2120
/// </summary>
2221
private static async Task Main(string[] args)
2322
{
@@ -146,7 +145,7 @@ private static bool CompareFiles(string file1, string file2)
146145

147146
using var reader1 = new StreamReader(stream1);
148147
using var reader2 = new StreamReader(stream2);
149-
while (reader1.ReadLine() is { } line1)
148+
while (reader1.ReadLine() is {} line1)
150149
{
151150
var line2 = reader2.ReadLine();
152151
if (line2 == null || line1 != line2)
+124-124
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,139 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net8.0-windows</TargetFramework>
6-
<Nullable>enable</Nullable>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
<UseWPF>true</UseWPF>
9-
<ApplicationIcon>lamp.ico</ApplicationIcon>
10-
</PropertyGroup>
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net8.0-windows</TargetFramework>
6+
<Nullable>enable</Nullable>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<UseWPF>true</UseWPF>
9+
<ApplicationIcon>lamp.ico</ApplicationIcon>
10+
</PropertyGroup>
1111

12-
<ItemGroup>
13-
<Content Include="..\ExternalApplications\DsmSuite.DsmViewer.View.deps.json" Link="ExternalApplications\DsmSuite.DsmViewer.View.deps.json">
14-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
15-
</Content>
16-
<Content Include="..\ExternalApplications\DsmSuite.DsmViewer.View.runtimeconfig.json" Link="ExternalApplications\DsmSuite.DsmViewer.View.runtimeconfig.json">
17-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
18-
</Content>
19-
<Content Include="appsettings.json">
20-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
21-
</Content>
22-
<Content Include="lamp.ico" />
23-
</ItemGroup>
12+
<ItemGroup>
13+
<Content Include="..\ExternalApplications\DsmSuite.DsmViewer.View.deps.json" Link="ExternalApplications\DsmSuite.DsmViewer.View.deps.json">
14+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
15+
</Content>
16+
<Content Include="..\ExternalApplications\DsmSuite.DsmViewer.View.runtimeconfig.json" Link="ExternalApplications\DsmSuite.DsmViewer.View.runtimeconfig.json">
17+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
18+
</Content>
19+
<Content Include="appsettings.json">
20+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
21+
</Content>
22+
<Content Include="lamp.ico"/>
23+
</ItemGroup>
2424

2525

26-
<ItemGroup>
27-
<Resource Include="Resources\help_32.png" />
28-
<Resource Include="Resources\legend_32.png" />
29-
<Resource Include="Resources\filter_32.png" />
30-
<Resource Include="Resources\undo_32.png" />
31-
<Resource Include="Resources\redo_32.png" />
32-
<Resource Include="Resources\clear_32.png" />
33-
<Resource Include="Resources\Collapse_16.png" />
34-
<Resource Include="Resources\complexity_32.png" />
35-
<Resource Include="Resources\cycle_32.png" />
36-
<Resource Include="Resources\document-xml.png" />
37-
<Resource Include="Resources\document_graph_32.png" />
38-
<Resource Include="Resources\document-xml_32.png" />
39-
<Resource Include="Resources\four-arrows.png" />
40-
<Resource Include="Resources\four-arrows_32.png" />
41-
<Resource Include="Resources\gear_32.png" />
42-
<Resource Include="Resources\import_solution.png" />
43-
<Resource Include="Resources\info_large.png" />
44-
<Resource Include="Resources\lamp.png" />
45-
<Resource Include="Resources\left-right.png" />
46-
<Resource Include="Resources\left-right_small.png" />
47-
<Resource Include="Resources\load_project.png" />
48-
<Resource Include="Resources\png-file_32.png" />
49-
<Resource Include="Resources\question.png" />
50-
<Resource Include="Resources\question_small.png" />
51-
<Resource Include="Resources\save_project.png" />
52-
<Resource Include="Resources\spreadsheet_32.png" />
53-
<Resource Include="Resources\svg-file_32.png" />
54-
<Resource Include="Resources\switch.png" />
55-
<Resource Include="Resources\trash-can.png" />
56-
<Resource Include="Resources\trash-can_32.png" />
57-
<Resource Include="Resources\workflow.png" />
58-
<Resource Include="Resources\cycle.png" />
59-
<Resource Include="Resources\unstructured-data_32.png" />
60-
</ItemGroup>
26+
<ItemGroup>
27+
<Resource Include="Resources\help_32.png"/>
28+
<Resource Include="Resources\legend_32.png"/>
29+
<Resource Include="Resources\filter_32.png"/>
30+
<Resource Include="Resources\undo_32.png"/>
31+
<Resource Include="Resources\redo_32.png"/>
32+
<Resource Include="Resources\clear_32.png"/>
33+
<Resource Include="Resources\Collapse_16.png"/>
34+
<Resource Include="Resources\complexity_32.png"/>
35+
<Resource Include="Resources\cycle_32.png"/>
36+
<Resource Include="Resources\document-xml.png"/>
37+
<Resource Include="Resources\document_graph_32.png"/>
38+
<Resource Include="Resources\document-xml_32.png"/>
39+
<Resource Include="Resources\four-arrows.png"/>
40+
<Resource Include="Resources\four-arrows_32.png"/>
41+
<Resource Include="Resources\gear_32.png"/>
42+
<Resource Include="Resources\import_solution.png"/>
43+
<Resource Include="Resources\info_large.png"/>
44+
<Resource Include="Resources\lamp.png"/>
45+
<Resource Include="Resources\left-right.png"/>
46+
<Resource Include="Resources\left-right_small.png"/>
47+
<Resource Include="Resources\load_project.png"/>
48+
<Resource Include="Resources\png-file_32.png"/>
49+
<Resource Include="Resources\question.png"/>
50+
<Resource Include="Resources\question_small.png"/>
51+
<Resource Include="Resources\save_project.png"/>
52+
<Resource Include="Resources\spreadsheet_32.png"/>
53+
<Resource Include="Resources\svg-file_32.png"/>
54+
<Resource Include="Resources\switch.png"/>
55+
<Resource Include="Resources\trash-can.png"/>
56+
<Resource Include="Resources\trash-can_32.png"/>
57+
<Resource Include="Resources\workflow.png"/>
58+
<Resource Include="Resources\cycle.png"/>
59+
<Resource Include="Resources\unstructured-data_32.png"/>
60+
</ItemGroup>
6161

6262

63-
<ItemGroup>
64-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
65-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
66-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
67-
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
68-
<PackageReference Include="Prism.Core" Version="8.1.97" />
69-
</ItemGroup>
63+
<ItemGroup>
64+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
65+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2"/>
66+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0"/>
67+
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122"/>
68+
<PackageReference Include="Prism.Core" Version="8.1.97"/>
69+
</ItemGroup>
7070

71-
<!--<ItemGroup>
72-
<PackageReference Include="AutomaticGraphLayout.WpfGraphControl" Version="1.1.12" />
73-
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
74-
<PackageReference Include="Prism.Core" Version="8.1.97" />
75-
</ItemGroup>-->
71+
<!--<ItemGroup>
72+
<PackageReference Include="AutomaticGraphLayout.WpfGraphControl" Version="1.1.12" />
73+
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
74+
<PackageReference Include="Prism.Core" Version="8.1.97" />
75+
</ItemGroup>-->
7676

77-
<ItemGroup>
78-
<ProjectReference Include="..\CodeParser\CodeParser.csproj" />
79-
<ProjectReference Include="..\Contracts\Contracts.csproj" />
80-
</ItemGroup>
77+
<ItemGroup>
78+
<ProjectReference Include="..\CodeParser\CodeParser.csproj"/>
79+
<ProjectReference Include="..\Contracts\Contracts.csproj"/>
80+
</ItemGroup>
8181

82-
<ItemGroup>
83-
<Folder Include="ExternalApplications\" />
84-
</ItemGroup>
82+
<ItemGroup>
83+
<Folder Include="ExternalApplications\"/>
84+
</ItemGroup>
8585

86-
<ItemGroup>
87-
<None Include="..\ExternalApplications\DsmSuite.Analyzer.Model.dll" Link="ExternalApplications\DsmSuite.Analyzer.Model.dll">
88-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
89-
</None>
90-
<None Include="..\ExternalApplications\DsmSuite.Common.Model.dll" Link="ExternalApplications\DsmSuite.Common.Model.dll">
91-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
92-
</None>
93-
<None Include="..\ExternalApplications\DsmSuite.Common.Util.dll" Link="ExternalApplications\DsmSuite.Common.Util.dll">
94-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
95-
</None>
96-
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.Application.dll" Link="ExternalApplications\DsmSuite.DsmViewer.Application.dll">
97-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
98-
</None>
99-
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.Model.dll" Link="ExternalApplications\DsmSuite.DsmViewer.Model.dll">
100-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
101-
</None>
102-
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.View.dll" Link="ExternalApplications\DsmSuite.DsmViewer.View.dll">
103-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
104-
</None>
105-
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.View.exe" Link="ExternalApplications\DsmSuite.DsmViewer.View.exe">
106-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
107-
</None>
108-
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.ViewModel.dll" Link="ExternalApplications\DsmSuite.DsmViewer.ViewModel.dll">
109-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
110-
</None>
111-
</ItemGroup>
86+
<ItemGroup>
87+
<None Include="..\ExternalApplications\DsmSuite.Analyzer.Model.dll" Link="ExternalApplications\DsmSuite.Analyzer.Model.dll">
88+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
89+
</None>
90+
<None Include="..\ExternalApplications\DsmSuite.Common.Model.dll" Link="ExternalApplications\DsmSuite.Common.Model.dll">
91+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
92+
</None>
93+
<None Include="..\ExternalApplications\DsmSuite.Common.Util.dll" Link="ExternalApplications\DsmSuite.Common.Util.dll">
94+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
95+
</None>
96+
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.Application.dll" Link="ExternalApplications\DsmSuite.DsmViewer.Application.dll">
97+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
98+
</None>
99+
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.Model.dll" Link="ExternalApplications\DsmSuite.DsmViewer.Model.dll">
100+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
101+
</None>
102+
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.View.dll" Link="ExternalApplications\DsmSuite.DsmViewer.View.dll">
103+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
104+
</None>
105+
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.View.exe" Link="ExternalApplications\DsmSuite.DsmViewer.View.exe">
106+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
107+
</None>
108+
<None Include="..\ExternalApplications\DsmSuite.DsmViewer.ViewModel.dll" Link="ExternalApplications\DsmSuite.DsmViewer.ViewModel.dll">
109+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
110+
</None>
111+
</ItemGroup>
112112

113-
<ItemGroup>
114-
<Reference Include="Microsoft.Msagl">
115-
<HintPath>..\ReferencedAssemblies\Microsoft.Msagl.dll</HintPath>
116-
</Reference>
117-
<Reference Include="Microsoft.Msagl.Drawing">
118-
<HintPath>..\ReferencedAssemblies\Microsoft.Msagl.Drawing.dll</HintPath>
119-
</Reference>
120-
<Reference Include="Microsoft.Msagl.WpfGraphControl">
121-
<HintPath>..\ReferencedAssemblies\Microsoft.Msagl.WpfGraphControl.dll</HintPath>
122-
</Reference>
123-
</ItemGroup>
113+
<ItemGroup>
114+
<Reference Include="Microsoft.Msagl">
115+
<HintPath>..\ReferencedAssemblies\Microsoft.Msagl.dll</HintPath>
116+
</Reference>
117+
<Reference Include="Microsoft.Msagl.Drawing">
118+
<HintPath>..\ReferencedAssemblies\Microsoft.Msagl.Drawing.dll</HintPath>
119+
</Reference>
120+
<Reference Include="Microsoft.Msagl.WpfGraphControl">
121+
<HintPath>..\ReferencedAssemblies\Microsoft.Msagl.WpfGraphControl.dll</HintPath>
122+
</Reference>
123+
</ItemGroup>
124124

125-
<ItemGroup>
126-
<Compile Update="Resources\Strings.Designer.cs">
127-
<DesignTime>True</DesignTime>
128-
<AutoGen>True</AutoGen>
129-
<DependentUpon>Strings.resx</DependentUpon>
130-
</Compile>
131-
</ItemGroup>
125+
<ItemGroup>
126+
<Compile Update="Resources\Strings.Designer.cs">
127+
<DesignTime>True</DesignTime>
128+
<AutoGen>True</AutoGen>
129+
<DependentUpon>Strings.resx</DependentUpon>
130+
</Compile>
131+
</ItemGroup>
132132

133-
<ItemGroup>
134-
<EmbeddedResource Update="Resources\Strings.resx">
135-
<Generator>PublicResXFileCodeGenerator</Generator>
136-
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
137-
</EmbeddedResource>
138-
</ItemGroup>
133+
<ItemGroup>
134+
<EmbeddedResource Update="Resources\Strings.resx">
135+
<Generator>PublicResXFileCodeGenerator</Generator>
136+
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
137+
</EmbeddedResource>
138+
</ItemGroup>
139139
</Project>

CSharpCodeAnalyst/CycleArea/CycleGroupViewModel.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,15 @@ public ObservableCollection<CodeElementLineViewModel> CodeElements
6262
}
6363
}
6464

65-
public int ElementCount => _highLevelElements.Count;
66-
public string CodeElementsDescription => $"Involves {CycleGroup.CodeGraph.Nodes.Count} code elements";
65+
public int ElementCount
66+
{
67+
get => _highLevelElements.Count;
68+
}
69+
70+
public string CodeElementsDescription
71+
{
72+
get => $"Involves {CycleGroup.CodeGraph.Nodes.Count} code elements";
73+
}
6774

6875
public CycleLevel Level { get; }
6976

0 commit comments

Comments
 (0)