Skip to content

Commit 522c1b9

Browse files
committed
Rules update from issues feedback may/juni
1 parent f8c4d30 commit 522c1b9

File tree

11 files changed

+200
-18
lines changed

11 files changed

+200
-18
lines changed

distribution/.editorconfig

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2-
# Version: 1.0.6
3-
# Updated: 11-05-2021
2+
# Version: 1.0.7
3+
# Updated: 18-06-2021
44
# Location: Root
55
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
66

@@ -445,9 +445,11 @@ dotnet_diagnostic.MA0048.severity = error # https://github.com/atc-net
445445

446446
# Microsoft - Code Analysis
447447
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
448+
dotnet_diagnostic.CA1014.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1014.md
449+
dotnet_diagnostic.CA1068.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
448450
dotnet_diagnostic.CA1707.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
449451
dotnet_diagnostic.CA2007.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
450-
dotnet_diagnostic.IDE0058.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md
452+
dotnet_diagnostic.IDE0058.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md
451453

452454

453455
# Microsoft - Compiler Errors
@@ -467,6 +469,7 @@ dotnet_diagnostic.SA1122.severity = error # https://github.com/atc-net
467469
dotnet_diagnostic.SA1133.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1133.md
468470
dotnet_diagnostic.SA1200.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1200.md
469471
dotnet_diagnostic.SA1201.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1201.md
472+
dotnet_diagnostic.SA1202.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1202.md
470473
dotnet_diagnostic.SA1204.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1204.md
471474
dotnet_diagnostic.SA1413.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1413.md
472475
dotnet_diagnostic.SA1600.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1600.md
@@ -475,6 +478,7 @@ dotnet_diagnostic.SA1604.severity = none # https://github.com/atc-net
475478
dotnet_diagnostic.SA1623.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1623.md
476479
dotnet_diagnostic.SA1629.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1629.md
477480
dotnet_diagnostic.SA1633.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1633.md
481+
dotnet_diagnostic.SA1649.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1649.md
478482

479483

480484
# SonarAnalyzer.CSharp

distribution/Directory.Build.props

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
<ItemGroup Label="Code Analyzers">
4242
<PackageReference Include="AsyncFixer" Version="1.5.1" PrivateAssets="All" />
4343
<PackageReference Include="Asyncify" Version="0.9.7" PrivateAssets="All" />
44-
<PackageReference Include="Meziantou.Analyzer" Version="1.0.646" PrivateAssets="All" />
44+
<PackageReference Include="Meziantou.Analyzer" Version="1.0.666" PrivateAssets="All" />
4545
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3" PrivateAssets="All" />
46-
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.0.0" PrivateAssets="All" />
46+
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.1.0" PrivateAssets="All" />
4747
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
48-
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.18.0.27296" PrivateAssets="All" />
48+
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.24.0.32949" PrivateAssets="All" />
4949
</ItemGroup>
5050

5151
</Project>

distribution/test/.editorconfig

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2-
# Version: 1.0.6
3-
# Updated: 11-05-2021
2+
# Version: 1.0.7
3+
# Updated: 18-06-2021
44
# Location: Test
55
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
66

@@ -25,6 +25,7 @@ dotnet_diagnostic.MA0016.severity = none # https://github.com/atc-net
2525

2626
# Microsoft - Code Analysis
2727
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
28+
dotnet_diagnostic.CA1068.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
2829
dotnet_diagnostic.CA1707.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
2930
dotnet_diagnostic.CA2007.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
3031

documentation/CodeAnalyzersRules/Meziantou/MA0048.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ We update the `root/.editorconfig` with `severity = error` and a doc-link.
3838

3939
### Reason & arguments
4040

41-
* It is a simple rule that ensure one file for type and naming should match.
41+
* It is a simple rule that ensures that the filename and typename matches.
42+
* This is a duplicate rule of SA1649.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Rule suppression decision
2+
3+
## Meeting
4+
5+
### Date for meeting
6+
7+
05-03-2021
8+
9+
### ATC Core members in meeting
10+
11+
* [Chris](https://github.com/orgs/atc-net/people/christianhelle)
12+
* [Claus](https://github.com/orgs/atc-net/people/cjakobsen)
13+
* [David](https://github.com/orgs/atc-net/people/davidkallesen)
14+
* [Egil](https://github.com/orgs/atc-net/people/egil)
15+
* [Jesper](https://github.com/orgs/atc-net/people/jhoejgaard)
16+
* [Kim](https://github.com/orgs/atc-net/people/kimlundjohansen)
17+
* [Lars](https://github.com/orgs/atc-net/people/LarsSkovslund)
18+
* [Mogens](https://github.com/orgs/atc-net/people/MogensFogh)
19+
* [Per](https://github.com/orgs/atc-net/people/perkops)
20+
* [Ricky](https://github.com/orgs/atc-net/people/rickykaare)
21+
* [Thomas](https://github.com/orgs/atc-net/people/TomMalow)
22+
23+
### Rule summary
24+
25+
| | Value |
26+
| ----------- |------------------------------------------------|
27+
| Title | CA1014 Mark assemblies with CLSCompliantAttribute |
28+
| CheckId | CA1014 |
29+
| Category | Design |
30+
| Link | https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/CA1014 |
31+
32+
### What is the problem
33+
34+
[Issue #35](https://github.com/atc-net/atc-coding-rules/issues/35)
35+
36+
### Decision
37+
38+
We update the `root/.editorconfig` with `severity = none` and a doc-link.
39+
40+
### Reason & arguments
41+
42+
* We don't like this rule, since it is a leftover from '.NET Framework'.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Rule suppression decision
2+
3+
## Meeting
4+
5+
### Date for meeting
6+
7+
05-03-2021
8+
9+
### ATC Core members in meeting
10+
11+
* [Chris](https://github.com/orgs/atc-net/people/christianhelle)
12+
* [Claus](https://github.com/orgs/atc-net/people/cjakobsen)
13+
* [David](https://github.com/orgs/atc-net/people/davidkallesen)
14+
* [Egil](https://github.com/orgs/atc-net/people/egil)
15+
* [Jesper](https://github.com/orgs/atc-net/people/jhoejgaard)
16+
* [Kim](https://github.com/orgs/atc-net/people/kimlundjohansen)
17+
* [Lars](https://github.com/orgs/atc-net/people/LarsSkovslund)
18+
* [Mogens](https://github.com/orgs/atc-net/people/MogensFogh)
19+
* [Per](https://github.com/orgs/atc-net/people/perkops)
20+
* [Ricky](https://github.com/orgs/atc-net/people/rickykaare)
21+
* [Thomas](https://github.com/orgs/atc-net/people/TomMalow)
22+
23+
### Rule summary
24+
25+
| | Value |
26+
| ----------- |------------------------------------------------|
27+
| Title | CA1068 CancellationToken parameters must come last |
28+
| CheckId | CA1068 |
29+
| Category | Design |
30+
| Link | https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/CA1068 |
31+
32+
### What is the problem
33+
34+
[Issue #50](https://github.com/atc-net/atc-coding-rules/issues/50)
35+
36+
### Decision
37+
38+
We update the `root/.editorconfig` with `severity = error` and a doc-link.
39+
We update the `test/.editorconfig` with `severity = none` and a doc-link.
40+
41+
### Reason & arguments
42+
43+
* We like the argument from Microsoft for code project.
44+
* For test project we like to be flexible.

documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828

2929
Just follow the rule for code project - see 'How to fix violations'
3030

31-
For test project we update the `text/.editorconfig` with `severity = none` and a doc-link.
31+
We update the `root/.editorconfig` with `severity = error` and a doc-link.
32+
We update the `test/.editorconfig` with `severity = none` and a doc-link.
3233

3334
### Reason & arguments
3435

35-
* We like the argument from Microsoft for code project
36-
* For test project we like the options for using underscores in method names
36+
* We do not like the argument from Microsoft for src projects.
37+
* For test projects we like the options for using underscores in method names.

documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Date for meeting
66

7-
11-02-2021
7+
11-02-2021 (updated 05-03-2021)
88

99
### ATC Core members in meeting
1010

@@ -34,10 +34,8 @@
3434

3535
### Decision
3636

37-
Just follow the rule - see 'How to fix violations'
38-
39-
We update the `root/.editorconfig` with `severity = error` and a doc-link.
37+
We update the `root/.editorconfig` with `severity = none` and a doc-link.
4038

4139
### Reason & arguments
4240

43-
* With this rule, it is clear to see, that the author has thought about the use of the return value and not just forgotten about it.
41+
* This rule make too much noise in practice - see dissuction in [Issue #29](https://github.com/atc-net/atc-coding-rules/issues/29).

documentation/CodeAnalyzersRules/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636

3737
| Rule | Area | Decision Date | root | src | test | sample | Decision link |
3838
|-------------|-------------------|:-------------:|:----:|:---:|:----:|:------:|---------------|
39+
| CA1014 | Design | 05-03-2021 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md) |
40+
| CA1068 | Design | 05-03-2021 || 🦡 | ✔️ | 🦡 | [link](/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md) |
3941
| CA1707 | Naming | 04-12-2020 || 🦡 | ✔️ | 🦡 | [link](/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md) |
4042
| CA2007 | Reliability | 05-02-2021 | ☑️ | 🦡 | ✔️ | 🦡 | [link](/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md) |
41-
| IDE0058 | Style | 11-02-2021 | | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md) |
43+
| IDE0058 | Style | 11-02-2021 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md) |
4244

4345
## [Microsoft - Compiler Errors](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/)
4446

@@ -62,6 +64,7 @@
6264
| SA1133 | Readability | 05-02-2021 || 🦡 | ✔️ | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1133.md) |
6365
| SA1200 | Documentation | 04-12-2020 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1200.md) |
6466
| SA1201 | Ordering Rules | 05-02-2021 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1201.md) |
67+
| SA1202 | Ordering Rules | 05-02-2021 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1202.md) |
6568
| SA1204 | Ordering Rules | 05-02-2021 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1204.md) |
6669
| SA1413 | Maintainability | 27-11-2020 || 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1413.md) |
6770
| SA1600 | Documentation | 04-12-2020 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1600.md) |
@@ -70,6 +73,7 @@
7073
| SA1623 | Documentation | 04-12-2020 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1623.md) |
7174
| SA1629 | Documentation | 11-02-2021 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1629.md) |
7275
| SA1633 | Documentation | 04-12-2020 | ✔️ | 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1633.md) |
76+
| SA1649 | Documentation | 05-03-2021 || 🦡 | 🦡 | 🦡 | [link](/documentation/CodeAnalyzersRules/StyleCop/SA1649.md) |
7377

7478
## [SonarAnalyzer.CSharp](https://rules.sonarsource.com/csharp)
7579

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Rule suppress suggestion - Decision
2+
3+
## Meeting
4+
5+
### Date for meeting
6+
7+
05-02-2021
8+
9+
### ATC Core members in meeting
10+
11+
* [Chris](https://github.com/orgs/atc-net/people/christianhelle)
12+
* [Claus](https://github.com/orgs/atc-net/people/cjakobsen)
13+
* [David](https://github.com/orgs/atc-net/people/davidkallesen)
14+
* [Egil](https://github.com/orgs/atc-net/people/egil)
15+
* [Jesper](https://github.com/orgs/atc-net/people/jhoejgaard)
16+
* [Kim](https://github.com/orgs/atc-net/people/kimlundjohansen)
17+
* [Lars](https://github.com/orgs/atc-net/people/LarsSkovslund)
18+
* [Mogens](https://github.com/orgs/atc-net/people/MogensFogh)
19+
* [Per](https://github.com/orgs/atc-net/people/perkops)
20+
* [Ricky](https://github.com/orgs/atc-net/people/rickykaare)
21+
* [Thomas](https://github.com/orgs/atc-net/people/TomMalow)
22+
23+
### Rule summary
24+
25+
| | Value |
26+
| ----------- |------------------------------------------------|
27+
| Title | SA1202ElementsMustBeOrderedByAccess |
28+
| CheckId | SA1202 |
29+
| Category | Ordering Rules |
30+
| Link | https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1202.md |
31+
32+
### What is the problem
33+
34+
[Issue #52](https://github.com/atc-net/atc-coding-rules/issues/52)
35+
36+
### Decision
37+
38+
We update the `root/.editorconfig` with `severity = none` and a doc-link.
39+
40+
### Reason & arguments
41+
42+
* This rule does not provide any good structure by just following a strict sorting order. We believe in logic grouping / sorting order instead of strict sorting ordering.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Rule suppression decision
2+
3+
## Meeting
4+
5+
### Date for meeting
6+
7+
05-03-2021
8+
9+
### ATC Core members in meeting
10+
11+
* [Chris](https://github.com/orgs/atc-net/people/christianhelle)
12+
* [Claus](https://github.com/orgs/atc-net/people/cjakobsen)
13+
* [David](https://github.com/orgs/atc-net/people/davidkallesen)
14+
* [Egil](https://github.com/orgs/atc-net/people/egil)
15+
* [Jesper](https://github.com/orgs/atc-net/people/jhoejgaard)
16+
* [Kim](https://github.com/orgs/atc-net/people/kimlundjohansen)
17+
* [Lars](https://github.com/orgs/atc-net/people/LarsSkovslund)
18+
* [Mogens](https://github.com/orgs/atc-net/people/MogensFogh)
19+
* [Per](https://github.com/orgs/atc-net/people/perkops)
20+
* [Ricky](https://github.com/orgs/atc-net/people/rickykaare)
21+
* [Thomas](https://github.com/orgs/atc-net/people/TomMalow)
22+
23+
### Rule summary
24+
25+
| | Value |
26+
| ----------- |------------------------------------------------|
27+
| Title | SA1649FileNameMustMatchTypeName |
28+
| CheckId | SA1649 |
29+
| Category | Documentation Rules |
30+
| Link | https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1649.md |
31+
32+
### What is the problem
33+
34+
[Issue #32](https://github.com/atc-net/atc-coding-rules/issues/32)
35+
36+
### Decision
37+
38+
Just follow the rule - see 'How to fix violations'
39+
40+
We update the `root/.editorconfig` with `severity = error` and a doc-link.
41+
42+
### Reason & arguments
43+
44+
* It is a simple rule that ensures that the filename and typename matches.
45+
* This is a duplicate rule of MA0048.

0 commit comments

Comments
 (0)