Skip to content

feat(naming): add rules for static readonly fields capitalization and…#349

Merged
samtrion merged 2 commits into
mainfrom
feature/readonly-static-properties
Mar 29, 2026
Merged

feat(naming): add rules for static readonly fields capitalization and…#349
samtrion merged 2 commits into
mainfrom
feature/readonly-static-properties

Conversation

@samtrion
Copy link
Copy Markdown
Contributor

@samtrion samtrion commented Mar 29, 2026

… severity

Summary by CodeRabbit

  • Chores
    • Added a new code style rule enforcing PascalCase naming for static readonly fields. Violations will be reported as errors during code analysis.

@samtrion samtrion self-assigned this Mar 29, 2026
@samtrion samtrion added the state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai label Mar 29, 2026
@samtrion samtrion requested a review from a team as a code owner March 29, 2026 11:50
@samtrion samtrion added the type:feature Indicates a new feature or enhancement to be added. label Mar 29, 2026
@samtrion samtrion requested review from Spacemonkay and removed request for a team March 29, 2026 11:50
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7333b34e-2cfa-496f-9a3e-2b0d38e641c1

📥 Commits

Reviewing files that changed from the base of the PR and between 591cb24 and 9cdc95d.

📒 Files selected for processing (1)
  • src/NetEvolve.Defaults/configurations/template.editorconfig

Walkthrough

A new .editorconfig naming rule was added to enforce PascalCase (pascal_case) for field symbols with modifiers static, readonly, reporting violations with error severity.

Changes

Cohort / File(s) Summary
EditorConfig Naming Rule
src/NetEvolve.Defaults/configurations/template.editorconfig
Added a naming rule, symbol specification, and naming style enforcing pascal_case for static readonly fields; severity set to error.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 I hopped into config, tidy and spry,
Static readonly fields now stand by,
PascalCase blossoms, neat and bright—
A rabbit's wink for code done right.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly refers to the main change: adding naming rules for static readonly fields capitalization, which matches the PR objectives and file changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/NetEvolve.Defaults/configurations/template.editorconfig`:
- Around line 137-143: The new naming rule all_static_readonly enforces
PascalCase for static readonly fields and will warn for existing
underscore-prefixed names; rename all occurrences of static readonly fields such
as _ruleNED0001 and _ruleOLD0001 to PascalCase (e.g., RuleNED0001, RuleOLD0001),
update every reference/usages and any tests or reflection code that depend on
the old names, and ensure the symbols declared with the required_modifiers
static, readonly match the all_static_readonly naming_style to eliminate the
warnings from dotnet_naming_rule.all_static_readonly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29d7e921-8741-4541-9f91-3fe717ca2370

📥 Commits

Reviewing files that changed from the base of the PR and between e07c51c and 591cb24.

📒 Files selected for processing (1)
  • src/NetEvolve.Defaults/configurations/template.editorconfig

Comment thread src/NetEvolve.Defaults/configurations/template.editorconfig
@samtrion samtrion merged commit 850ab07 into main Mar 29, 2026
12 checks passed
@samtrion samtrion deleted the feature/readonly-static-properties branch March 29, 2026 12:15
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (e07c51c) to head (9cdc95d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #349   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant