Skip to content

feat(dev-docs): Require the measurement unit in names if it is not in the static type.#65

Open
davidlion wants to merge 3 commits into
y-scope:mainfrom
davidlion:var_naming_units
Open

feat(dev-docs): Require the measurement unit in names if it is not in the static type.#65
davidlion wants to merge 3 commits into
y-scope:mainfrom
davidlion:var_naming_units

Conversation

@davidlion

@davidlion davidlion commented Jun 26, 2026

Copy link
Copy Markdown
Member

Description

Added a general section to explicitly name measurement units if not handled by the type.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

CI passing.

Summary by CodeRabbit

  • Documentation
    • Added a new naming guidance section.
    • Clarified how to name variables and fields that represent measurement units.
    • Recommended including units directly in names when not already clear from type information (e.g., using suffixes like _kb or _ms).
    • Noted an exception when the type already conveys unit details (such as strongly typed time APIs).

@davidlion davidlion requested a review from a team as a code owner June 26, 2026 03:53
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 872496ba-92c3-4978-98b2-4db1bb40cde9

📥 Commits

Reviewing files that changed from the base of the PR and between d9afd19 and 62e3da3.

📒 Files selected for processing (1)
  • docs/dev-docs/dev-guide/contrib-guides-general.md

Walkthrough

The contributor guide adds a new Naming subsection that defines measurement-unit naming rules, including suffix-based unit naming when type information does not already express the unit.

Changes

Naming documentation

Layer / File(s) Summary
Measurement units guidance
docs/dev-docs/dev-guide/contrib-guides-general.md
Adds a Measurement units subsection under Naming with explicit unit naming rules, suffix guidance, and a std::chrono exception.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the doc change about requiring measurement units in names when the static type does not carry them.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/dev-docs/dev-guide/contrib-guides-general.md`:
- Around line 13-15: The C++ example text has awkward wording and a missing
comma; revise the sentence in the contribution guide to read more naturally by
adding the comma after “integer type” and rephrasing the “name the variable with
a `_kb` suffix” part so it clearly describes the naming convention rather than
sounding like a command. Update the example sentence in the docs section that
mentions `_kb` and `_ms` suffixes to improve clarity and flow.
- Around line 9-11: The sentence in the contributor guide is missing the comma
in the conditional clause, so update the wording in the measurement-units
guidance to separate “If the unit is not statically available in the type
information” from “then it must be added to the name.” Make this edit in the
paragraph containing the unit naming rule so the readability is improved without
changing the meaning.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: 908feeba-d00c-47d3-83e6-983e6966a2a0

📥 Commits

Reviewing files that changed from the base of the PR and between fb4670d and d9afd19.

📒 Files selected for processing (1)
  • docs/dev-docs/dev-guide/contrib-guides-general.md

Comment thread docs/dev-docs/dev-guide/contrib-guides-general.md
Comment thread docs/dev-docs/dev-guide/contrib-guides-general.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant