Skip to content

Commit

Permalink
Add ECS1400 to shipping docs and update preamble on ECS1300 (#72)
Browse files Browse the repository at this point in the history
Related to #70, #71
  • Loading branch information
rjmurillo authored Sep 28, 2024
1 parent de327e4 commit 2a3bc76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/rules/ECS1300.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ECS1300: Use Proper Initialization for Static Class Members

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/).

## Cause

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.
Expand Down
1 change: 1 addition & 0 deletions src/EffectiveCSharp.Analyzers/AnalyzerReleases.Shipped.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ Rule ID | Category | Severity | Notes
--------|----------|----------|-------
ECS1200 | Maintainability | Info | PreferMemberInitializerAnalyzer, [Documentation](https://github.com/rjmurillo/EffectiveCSharp.Analyzers/blob/75e6c1b724be72db803fef4ebc99f07bdee4bf61/docs/rules/ECS1200.md)
ECS1300 | Initialization | Info | StaticClassMemberInitializationAnalyzer, [Documentation](https://github.com/rjmurillo/EffectiveCSharp.Analyzers/blob/9144e7c2240d02021734e67795adc2f4096d15ce/docs/rules/ECS1300.md)
ECS1400 | Initialization | Info | MinimizeDuplicateInitializationLogicAnalyzer, [Documentation](https://github.com/rjmurillo/EffectiveCSharp.Analyzers/blob/de327e45776ce4195db07e6624a7d493c9400fb9/docs/rules/ECS1400.md)
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

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

0 comments on commit 2a3bc76

Please sign in to comment.