Skip to content

Commit 2a3bc76

Browse files
authored
Add ECS1400 to shipping docs and update preamble on ECS1300 (#72)
Related to #70, #71
1 parent de327e4 commit 2a3bc76

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

docs/rules/ECS1300.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ECS1300: Use Proper Initialization for Static Class Members
22

3+
This rule is described in detail in [Effective C#: 50 Specific Ways to Improve your C#](https://www.oreilly.com/library/view/effective-c-50/9780134579290/).
4+
35
## Cause
46

57
Static fields initialized with complex expressions or method calls that might throw exceptions can cause runtime errors during type initialization. These exceptions occur before any static constructors or error-handling mechanisms can intercept them, potentially crashing the application.

src/EffectiveCSharp.Analyzers/AnalyzerReleases.Shipped.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Rule ID | Category | Severity | Notes
2323
--------|----------|----------|-------
2424
ECS1200 | Maintainability | Info | PreferMemberInitializerAnalyzer, [Documentation](https://github.com/rjmurillo/EffectiveCSharp.Analyzers/blob/75e6c1b724be72db803fef4ebc99f07bdee4bf61/docs/rules/ECS1200.md)
2525
ECS1300 | Initialization | Info | StaticClassMemberInitializationAnalyzer, [Documentation](https://github.com/rjmurillo/EffectiveCSharp.Analyzers/blob/9144e7c2240d02021734e67795adc2f4096d15ce/docs/rules/ECS1300.md)
26+
ECS1400 | Initialization | Info | MinimizeDuplicateInitializationLogicAnalyzer, [Documentation](https://github.com/rjmurillo/EffectiveCSharp.Analyzers/blob/de327e45776ce4195db07e6624a7d493c9400fb9/docs/rules/ECS1400.md)

src/EffectiveCSharp.Analyzers/AnalyzerReleases.Unshipped.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
Rule ID | Category | Severity | Notes
77
--------|----------|----------|-------
8-
ECS1400 | Initialization | Info | MinimizeDuplicateInitializationLogicAnalyzer, [Documentation](https://github.com/rjmurillo/EffectiveCSharp.Analyzers/blob/4f481355aaf72846c9ff201c6ccd8551bf7874f5/docs/rules/ECS1400.md)
8+

0 commit comments

Comments
 (0)