-
Notifications
You must be signed in to change notification settings - Fork 1
Add Item 16: Do not call overridable methods in constructors #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Item 16: Do not call overridable methods in constructors #68
Conversation
WalkthroughThe pull request introduces a new diagnostic rule to the Changes
Assessment against linked issues
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
…functions-in-constructors # Conflicts: # src/EffectiveCSharp.Analyzers/Build/Config/General.globalconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
- src/EffectiveCSharp.Analyzers/Build/Config/General.globalconfig (2 hunks)
🔇 Additional comments (3)
src/EffectiveCSharp.Analyzers/Build/Config/General.globalconfig (3)
4-7
: Improved clarity on global_level behavior in .NET 6+The updated comment provides valuable information on how conflicting entries are handled in .NET 6+. This clarification is crucial for developers to understand the precedence rules when working with multiple configuration files.
56-56
: Improved formattingThe addition of a newline before the CA1063 rule improves readability and maintains consistency with the formatting of other rules in the file.
Line range hint
1-56
: Summary of changesThe changes in this file successfully implement the main objective of the PR by adding the CA2214 rule to prevent calling overridable methods in constructors. Additionally, the updates improve clarity on global_level behavior and enhance overall formatting.
These modifications align well with the PR objectives and address the concerns raised in issue #59. The implementation enforces best practices in C# programming, particularly regarding constructor behavior in object-oriented programming.
Update
.globalconfig
to enable CA2214 with Warning severityCloses #59