Skip to content

Commit bd7d6b5

Browse files
Merge pull request #23 from atc-net/feature/move-some-logic-to-Atc.Wpf.Controls
Feature/move some logic to atc.wpf.controls
2 parents a49b843 + 813c774 commit bd7d6b5

File tree

51 files changed

+424
-350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+424
-350
lines changed

.editorconfig

+12-5
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ csharp_style_unused_value_assignment_preference = discard_variable
201201

202202
# Index and range preferences
203203
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
204-
csharp_style_prefer_index_operator = true # IDE0056
205-
csharp_style_prefer_range_operator = true # IDE0057
204+
csharp_style_prefer_index_operator = true:suggestion # IDE0056
205+
csharp_style_prefer_range_operator = true:suggestion # IDE0057
206206

207207
# Miscellaneous preferences
208208
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
@@ -450,18 +450,23 @@ dotnet_naming_rule.parameters_rule.severity = warning
450450
dotnet_diagnostic.MA0003.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0003.md
451451
dotnet_diagnostic.MA0004.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0004.md
452452
dotnet_diagnostic.MA0006.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0006.md
453+
dotnet_diagnostic.MA0011.severity = none # Duplicate of CA1305
453454
dotnet_diagnostic.MA0016.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0016.md
454455
dotnet_diagnostic.MA0025.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0025.md
455456
dotnet_diagnostic.MA0026.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0026.md
456457
dotnet_diagnostic.MA0028.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0028.md
458+
dotnet_diagnostic.MA0038.severity = none # Duplicate of CA1822
457459
dotnet_diagnostic.MA0048.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0048.md
458460

459461

460462
# Microsoft - Code Analysis
461463
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
462464
dotnet_diagnostic.CA1014.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1014.md
463465
dotnet_diagnostic.CA1068.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
466+
dotnet_diagnostic.CA1305.severity = error
464467
dotnet_diagnostic.CA1707.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
468+
dotnet_diagnostic.CA1812.severity = none
469+
dotnet_diagnostic.CA1822.severity = suggestion
465470
dotnet_diagnostic.CA2007.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
466471
dotnet_diagnostic.IDE0005.severity = warning # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0005.md
467472
dotnet_diagnostic.IDE0058.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md
@@ -488,6 +493,7 @@ dotnet_diagnostic.SA1202.severity = none # https://github.com/atc-net
488493
dotnet_diagnostic.SA1204.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1204.md
489494
dotnet_diagnostic.SA1413.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1413.md
490495
dotnet_diagnostic.SA1600.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1600.md
496+
dotnet_diagnostic.SA1601.severity = none
491497
dotnet_diagnostic.SA1602.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1602.md
492498
dotnet_diagnostic.SA1604.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1604.md
493499
dotnet_diagnostic.SA1623.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1623.md
@@ -499,6 +505,10 @@ dotnet_diagnostic.SA1649.severity = error # https://github.com/atc-net
499505
# SonarAnalyzer.CSharp
500506
# https://rules.sonarsource.com/csharp
501507
dotnet_diagnostic.S1135.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/SonarAnalyzerCSharp/S1135.md
508+
dotnet_diagnostic.S2629.severity = none # Don't use string interpolation in logging message templates.
509+
dotnet_diagnostic.S6602.severity = none # "Find" method should be used instead of the "FirstOrDefault"
510+
dotnet_diagnostic.S6603.severity = none # The collection-specific "TrueForAll" method should be used instead of the "All"
511+
dotnet_diagnostic.S6605.severity = none # Collection-specific "Exists" method should be used instead of the "Any"
502512

503513

504514
##########################################
@@ -525,11 +535,8 @@ dotnet_diagnostic.IDE0079.severity = none # dotnet_remove_unnecessary_
525535

526536
dotnet_diagnostic.MA0134.severity = none # Observe result of async calls
527537

528-
dotnet_diagnostic.S2629.severity = none # Don't use string interpolation in logging message templates.
529538
dotnet_diagnostic.S3267.severity = none # Loops should be simplified with 'LINQ' expressions
530539
dotnet_diagnostic.S4487.severity = none # Remove this unread private field
531-
dotnet_diagnostic.S6602.severity = none # "Find" method should be used instead of the "FirstOrDefault"
532-
dotnet_diagnostic.S6605.severity = none # Collection-specific "Exists" method should be used instead of the "Any"
533540
dotnet_diagnostic.S6667.severity = none # Logging in a catch clause should pass the caught exception as a parameter.
534541

535542
dotnet_diagnostic.SCS0006.severity = none # Do Not Use Broken Cryptographic Algorithms - Its ok, only using to calculate a file-hash

.github/workflows/post-integration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: windows-latest
1818
steps:
1919
- name: 🛒 Checkout repository
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323
token: ${{ secrets.PAT_WORKFLOWS }}
@@ -31,7 +31,7 @@ jobs:
3131
setAllVars: true
3232

3333
- name: ⚙️ Setup dotnet 8.0.x
34-
uses: actions/setup-dotnet@v1
34+
uses: actions/setup-dotnet@v4
3535
with:
3636
dotnet-version: '8.0.x'
3737

.github/workflows/pre-integration.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
runs-on: windows-latest
1313
steps:
1414
- name: 🛒 Checkout repository
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
1818

1919
- name: ⚙️ Setup dotnet 8.0.x
20-
uses: actions/setup-dotnet@v1
20+
uses: actions/setup-dotnet@v4
2121
with:
2222
dotnet-version: '8.0.x'
2323

@@ -42,12 +42,12 @@ jobs:
4242
# - dotnet-build
4343
# steps:
4444
# - name: 🛒 Checkout repository
45-
# uses: actions/checkout@v2
45+
# uses: actions/checkout@v4
4646
# with:
4747
# fetch-depth: 0
4848

4949
# - name: ⚙️ Setup dotnet 8.0.x
50-
# uses: actions/setup-dotnet@v1
50+
# uses: actions/setup-dotnet@v4
5151
# with:
5252
# dotnet-version: '8.0.x'
5353

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: windows-latest
1919
steps:
2020
- name: 🛒 Checkout repository
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 0
2424
token: ${{ secrets.PAT_WORKFLOWS }}
@@ -32,7 +32,7 @@ jobs:
3232
setAllVars: true
3333

3434
- name: ⚙️ Setup dotnet 8.0.x
35-
uses: actions/setup-dotnet@v1
35+
uses: actions/setup-dotnet@v4
3636
with:
3737
dotnet-version: '8.0.x'
3838

Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
<ItemGroup Label="Code Analyzers">
4242
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
4343
<PackageReference Include="Asyncify" Version="0.9.7" PrivateAssets="All" />
44-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.145" PrivateAssets="All" />
44+
<PackageReference Include="Meziantou.Analyzer" Version="2.0.150" PrivateAssets="All" />
4545
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="All" />
4646
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" />
47-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.21.0.86780" PrivateAssets="All" />
47+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.24.0.89429" PrivateAssets="All" />
4848
</ItemGroup>
4949

5050
</Project>

atc-coding-rules-updater.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ atc-coding-rules-updater `
99
run `
1010
-p $currentPath `
1111
--optionsPath $currentPath'\atc-coding-rules-updater.json' `
12-
-v
12+
--verbose
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2+
# Version: 1.0.0
3+
# Updated: 27-03-2024
4+
# Location: blazor
5+
# Distribution: Frameworks
6+
7+
##########################################
8+
# Code Analyzers Rules
9+
##########################################
10+
[*.{cs}]
11+
12+
dotnet_diagnostic.MA0048.severity = none # To support code-behind [component].razor.cs files / Inherit from ComponentBase - File will not match type name.
13+
14+
##########################################
15+
# Custom - Code Analyzers Rules
16+
##########################################
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2+
# Version: 1.0.0
3+
# Updated: 27-03-2024
4+
# Location: maui
5+
# Distribution: Frameworks
6+
7+
##########################################
8+
# Code Analyzers Rules
9+
##########################################
10+
[*.{cs}]
11+
12+
##########################################
13+
# Custom - Code Analyzers Rules
14+
##########################################
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2+
# Version: 1.0.0
3+
# Updated: 27-03-2024
4+
# Location: wpf
5+
# Distribution: Frameworks
6+
7+
##########################################
8+
# Code Analyzers Rules
9+
##########################################
10+
[*.{cs}]
11+
12+
dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
13+
dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name.
14+
15+
##########################################
16+
# Custom - Code Analyzers Rules
17+
##########################################

src/Atc.Installer.Integration.Azure/Atc.Installer.Integration.Azure.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Atc" Version="2.0.433" />
10-
<PackageReference Include="Azure.Identity" Version="1.10.4" />
9+
<PackageReference Include="Atc" Version="2.0.472" />
10+
<PackageReference Include="Azure.Identity" Version="1.11.2" />
1111
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
1212
</ItemGroup>
1313

src/Atc.Installer.Integration.WindowsApplication/Atc.Installer.Integration.WindowsApplication.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Atc" Version="2.0.433" />
9+
<PackageReference Include="Atc" Version="2.0.472" />
1010
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.0" />
1111
</ItemGroup>
1212

src/Atc.Installer.Integration/Atc.Installer.Integration.csproj

+1-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Atc" Version="2.0.433" />
22-
</ItemGroup>
23-
24-
<ItemGroup>
25-
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.20.0.85982" />
21+
<PackageReference Include="Atc" Version="2.0.472" />
2622
</ItemGroup>
2723

2824
</Project>
+8-37
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,16 @@
11
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2-
# Version: 1.0.9
3-
# Updated: 24-11-2022
4-
# Location: src
5-
# Distribution: DotNet7
6-
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
2+
# Version: 1.0.0
3+
# Updated: 27-03-2024
4+
# Location: wpf
5+
# Distribution: Frameworks
76

87
##########################################
98
# Code Analyzers Rules
109
##########################################
11-
[*.{cs,csx,cake}]
10+
[*.{cs}]
1211

13-
# AsyncFixer
14-
# http://www.asyncfixer.com
15-
16-
17-
# Asyncify
18-
# https://github.com/hvanbakel/Asyncify-CSharp
19-
20-
21-
# Meziantou
22-
# https://www.meziantou.net/enforcing-asynchronous-code-good-practices-using-a-roslyn-analyzer.htm
23-
24-
25-
# Microsoft - Code Analysis
26-
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
27-
28-
29-
# Microsoft - Compiler Errors
30-
# https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/
31-
32-
33-
# SecurityCodeScan
34-
# https://security-code-scan.github.io/
35-
36-
37-
# StyleCop
38-
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
39-
40-
41-
# SonarAnalyzer.CSharp
42-
# https://rules.sonarsource.com/csharp
12+
dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
13+
dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name.
4314

4415

4516
##########################################
@@ -50,4 +21,4 @@ dotnet_diagnostic.CA1031.severity = none # Do not catch general e
5021

5122
dotnet_diagnostic.MA0049.severity = none # File should match
5223

53-
dotnet_diagnostic.S4487.severity = none # Remove unread private field
24+
dotnet_diagnostic.S4487.severity = none # Remove unread private field

src/Atc.Installer.Wpf.App/App.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<ResourceDictionary Source="pack://application:,,,/Atc.Wpf.Controls;component/Styles/Controls.xaml" />
1313
</ResourceDictionary.MergedDictionaries>
1414

15-
<Style BasedOn="{StaticResource AtcApps.Styles.MenuItem}" TargetType="MenuItem">
15+
<Style BasedOn="{StaticResource AtcApps.Styles.MenuItem}" TargetType="{x:Type MenuItem}">
1616
<Setter Property="HorizontalContentAlignment" Value="Left" />
1717
<Setter Property="VerticalContentAlignment" Value="Center" />
1818
</Style>

0 commit comments

Comments
 (0)