Skip to content

Rename package to fix golangci-lint check error#324

Merged
samihan-dell merged 4 commits into
mainfrom
usr/samihan-dell/package-name-change
Jul 5, 2025
Merged

Rename package to fix golangci-lint check error#324
samihan-dell merged 4 commits into
mainfrom
usr/samihan-dell/package-name-change

Conversation

@samihan-dell
Copy link
Copy Markdown
Contributor

@samihan-dell samihan-dell commented Jul 2, 2025

Description

Rename package to fix golangci-lint check error

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1896

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Unit tests passed
  • Sanity test: cert-csi certification test passed

Copy link
Copy Markdown
Contributor

@lukeatdell lukeatdell left a comment

Choose a reason for hiding this comment

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

Renaming utils to serviceutils doesn't truly resolve the issues outlined by the revive error message: avoid meaningless package names.
serviceutils is just as meaningless as utils, and tells us nothing about what kind of functions we can expect to find in the package, and only serves as a workaround to the revive check.

Instead, I suggest identifying functions from utils that have a similar purpose or operate on similar data/structs and moving those to an aptly named package.

alikdell
alikdell previously approved these changes Jul 3, 2025
@samihan-dell
Copy link
Copy Markdown
Contributor Author

Renaming utils to serviceutils doesn't truly resolve the issues outlined by the revive error message: avoid meaningless package names. serviceutils is just as meaningless as utils, and tells us nothing about what kind of functions we can expect to find in the package, and only serves as a workaround to the revive check.

Instead, I suggest identifying functions from utils that have a similar purpose or operate on similar data/structs and moving those to an aptly named package.

I have updated code now. I have divided serviceutils into two packages.

@samihan-dell samihan-dell requested a review from lukeatdell July 4, 2025 09:40
francis-nijay
francis-nijay previously approved these changes Jul 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 4, 2025

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csi-unity/service 86.25% (ø)
github.com/dell/csi-unity/service/csiutils 88.41% (+88.41%) 🌟
github.com/dell/csi-unity/service/logging 94.67% (+94.67%) 🌟

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csi-unity/service/controller.go 87.14% (ø) 1050 915 135
github.com/dell/csi-unity/service/csiutils/csiutils.go 88.41% (+88.41%) 207 (+207) 183 (+183) 24 (+24) 🌟
github.com/dell/csi-unity/service/logging/logging.go 94.67% (+94.67%) 75 (+75) 71 (+71) 4 (+4) 🌟
github.com/dell/csi-unity/service/mount.go 82.13% (ø) 498 409 89
github.com/dell/csi-unity/service/node.go 79.71% (ø) 956 762 194
github.com/dell/csi-unity/service/service.go 92.21% (ø) 398 367 31
github.com/dell/csi-unity/service/validator.go 98.11% (ø) 159 156 3

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/csi-unity/service/csi_extension_test.go
  • github.com/dell/csi-unity/service/csiutils/csiutils_test.go
  • github.com/dell/csi-unity/service/logging/logging_test.go
  • github.com/dell/csi-unity/service/main_test.go
  • github.com/dell/csi-unity/service/mount_test.go
  • github.com/dell/csi-unity/service/node_test.go
  • github.com/dell/csi-unity/service/service_test.go

@samihan-dell samihan-dell dismissed lukeatdell’s stale review July 5, 2025 18:46

Requested change by Luke is added. Received sufficient approvals. As Luke is on leave, so dismissing the review to proceed with merging.

@samihan-dell samihan-dell merged commit fe11234 into main Jul 5, 2025
6 checks passed
@samihan-dell samihan-dell deleted the usr/samihan-dell/package-name-change branch July 5, 2025 18:46
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.

8 participants