Skip to content

docs: fix typos in GoDoc comments for quantity and error utility func…#6127

Open
saiashok0981 wants to merge 1 commit into
fluid-cloudnative:masterfrom
saiashok0981:dev/1
Open

docs: fix typos in GoDoc comments for quantity and error utility func…#6127
saiashok0981 wants to merge 1 commit into
fluid-cloudnative:masterfrom
saiashok0981:dev/1

Conversation

@saiashok0981

Copy link
Copy Markdown

Fix three GoDoc documentation errors across pkg/utils/quantity.go and pkg/utils/errors.go: two misspelled function names in doc comments and one typo in an existing comment. Additionally, add the missing GoDoc comment for the exported function IgnoreNoKindMatchError.

Motivation
Go's documentation convention (godoc) requires that every exported identifier is documented, and that the doc comment begins with the name of the identifier. When GoDoc comment function names are misspelled, automated API documentation generators and IDE tooling (e.g., gopls hover) produce misleading output. The IgnoreNoKindMatchError function was previously exported with no comment at all, which suppresses its entry in generated docs and triggers golint / revive lint warnings.

Fixing these now reduces technical documentation debt and ensures consistency across the pkg/utils package, which is among the most widely used internal packages in this repository.

Signed-off-by: saiashok103@gmail.com

…tions

Fix two misspelled function names in GoDoc comments within pkg/utils/quantity.go:
  - Line 40: 'TransfromQuantityToJindoUnit' -> 'TransformQuantityToJindoUnit'
  - Line 72: 'TranformQuantityToUnits' -> 'TransformQuantityToUnits'

Fix typo in pkg/utils/errors.go IgnoreAlreadyExists comment:
  - 'already existes error' -> 'already exists error'

Add missing GoDoc comment for the exported function IgnoreNoKindMatchError
in pkg/utils/errors.go. Exported functions should always have a documentation
comment per Go conventions (https://go.dev/blog/godoc), and the absence of
one suppresses godoc output and linting warnings.

These are documentation-only changes with zero runtime behavior impact.

Signed-off-by: saiashok103@gmail.com
@fluid-e2e-bot

fluid-e2e-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ronggu for approval by writing /assign @ronggu in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fluid-e2e-bot

fluid-e2e-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

Hi @saiashok0981. Thanks for your PR.

I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request corrects typos in function comments within pkg/utils/errors.go and pkg/utils/quantity.go, and adds descriptive documentation for the IgnoreNoKindMatchError function. The reviewer provided actionable suggestions to further improve the clarity and grammatical consistency of the documentation comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread pkg/utils/errors.go
)

// IgnoreAlreadyExists ignores already existes error
// IgnoreAlreadyExists ignores already exists error

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To improve clarity and grammatical correctness, this comment could be rephrased. The current phrasing 'ignores already exists error' is slightly awkward.

Suggested change
// IgnoreAlreadyExists ignores already exists error
// IgnoreAlreadyExists ignores errors indicating that a resource already exists.

Comment thread pkg/utils/quantity.go
}

// TransfromQuantityToJindoUnit transform a given input quantity to another one
// TransformQuantityToJindoUnit transform a given input quantity to another one

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To fully align with GoDoc conventions, the verb in the summary sentence should be in the third-person singular form. The verb transform should be transforms.

Suggested change
// TransformQuantityToJindoUnit transform a given input quantity to another one
// TransformQuantityToJindoUnit transforms a given input quantity to another one

@cheyang

cheyang commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

@saiashok0981 — this PR is blocked from merging by a failing DCO check.
The DCO bot requires every commit to carry a Signed-off-by: trailer; without it the PR cannot land regardless of lgtm / approved labels or otherwise-green CI.

Please resolve this now. For a single-commit PR:

git commit --amend -s
git push --force-with-lease

For multiple commits on this branch:

git rebase --signoff origin/master
git push --force-with-lease

The code review side is finished and any merge labels already on the PR will take effect once DCO turns green. Reference: https://github.com/apps/dco

@cheyang

cheyang commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

/copilot review

Comment thread pkg/utils/quantity.go
}

// TransfromQuantityToJindoUnit transform a given input quantity to another one
// TransformQuantityToJindoUnit transform a given input quantity to another one

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since you're already touching this line for the typo, worth making the GoDoc summary read as third-person singular: "transforms a given input quantity..." rather than "transform". Its sibling TransformQuantityToAlluxioUnit has the same quirk, so no need to chase that one here unless you feel like it.

Comment thread pkg/utils/errors.go
)

// IgnoreAlreadyExists ignores already existes error
// IgnoreAlreadyExists ignores already exists error

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Optional: "ignores already exists error" still reads a little terse. Something like "ignores errors indicating that a resource already exists" flows better, but the current fix is already correct — fine to leave as-is.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.08%. Comparing base (3e44ad2) to head (ffe934c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6127   +/-   ##
=======================================
  Coverage   65.08%   65.08%           
=======================================
  Files         485      485           
  Lines       33989    33989           
=======================================
  Hits        22122    22122           
  Misses      10126    10126           
  Partials     1741     1741           

☔ View full report in Codecov by Harness.
📢 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants