Skip to content
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

Clean code #2945

Merged
merged 18 commits into from
Sep 24, 2024
Merged

Clean code #2945

merged 18 commits into from
Sep 24, 2024

Conversation

End-rey
Copy link
Contributor

@End-rey End-rey commented Sep 23, 2024

Refs #2943.

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 13.55932% with 51 lines in your changes missing coverage. Please review.

Project coverage is 23.88%. Comparing base (ca16d59) to head (d5f1eb7).
Report is 19 commits behind head on master.

Files with missing lines Patch % Lines
pkg/local_object_storage/engine/tree.go 0.00% 8 Missing ⚠️
pkg/morph/client/client.go 0.00% 6 Missing ⚠️
...d/neofs-adm/internal/modules/morph/local_client.go 0.00% 4 Missing ⚠️
cmd/neofs-adm/internal/modules/morph/notary.go 0.00% 4 Missing ⚠️
...ct_storage/blobstor/fstree/fstree_write_generic.go 0.00% 4 Missing ⚠️
pkg/local_object_storage/shard/exists.go 0.00% 2 Missing and 2 partials ⚠️
...-adm/internal/modules/morph/initialize_register.go 0.00% 3 Missing ⚠️
...-adm/internal/modules/morph/initialize_transfer.go 0.00% 3 Missing ⚠️
...ofs-adm/internal/modules/morph/verified_domains.go 0.00% 3 Missing ⚠️
cmd/neofs-cli/modules/util/acl.go 0.00% 2 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2945      +/-   ##
==========================================
- Coverage   23.89%   23.88%   -0.01%     
==========================================
  Files         776      776              
  Lines       45888    45899      +11     
==========================================
- Hits        10963    10962       -1     
- Misses      34064    34073       +9     
- Partials      861      864       +3     

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

Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

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

sure 1st commit closes the entire issue?

dont insist, but i'd squash all commits into one - fixing all linting remarks

cmd/neofs-adm/internal/modules/morph/local_client.go Outdated Show resolved Hide resolved
pkg/local_object_storage/engine/lock_test.go Show resolved Hide resolved
pkg/services/control/service_test.go Show resolved Hide resolved
cmd/neofs-adm/internal/modules/config/config_test.go Outdated Show resolved Hide resolved
pkg/morph/timer/block_test.go Outdated Show resolved Hide resolved
@roman-khimov
Copy link
Member

squash all commits into one

Please don't. They're nice this way, each commit fixing some linter of its own. Really easy to look through.

@cthulhu-rider
Copy link
Contributor

They're nice this way

Really easy to look through.

too personal and doubtful. In opposite, to me, service commits make it more difficult to navigate foundational changes

@roman-khimov
Copy link
Member

too personal and doubtful

Each commit solves some problem of its own, no doubt it's better.

@cthulhu-rider
Copy link
Contributor

Each commit solves some problem of its own

having lint action failures -> no failures - this is the most reasonable atomic problem statement for this project to me. And 20 linter-related commits taking up the entire screen is just a distraction

finally, my point remains, but since the work of separation has been done, let it remain too

Signed-off-by: Andrey Butusov <[email protected]>
Signed-off-by: Andrey Butusov <[email protected]>
Update to `math/rand/v2` and use `crypto/rand` for `rand.Read`.

Signed-off-by: Andrey Butusov <[email protected]>
Error: `struct literal uses unkeyed fields`.

Signed-off-by: Andrey Butusov <[email protected]>
Errors: `S1023: redundant `return` statement` and `S1019: should use
make(chan *Move) instead`.

Signed-off-by: Andrey Butusov <[email protected]>
Error: `duplicated-imports`.

Signed-off-by: Andrey Butusov <[email protected]>
Signed-off-by: Andrey Butusov <[email protected]>
Error: `Comment should end in a period`.

Signed-off-by: Andrey Butusov <[email protected]>
Error: `SA4004: the surrounding loop is unconditionally terminated`.

Signed-off-by: Andrey Butusov <[email protected]>
Errors: `unnecessary leading newline` and `unnecessary trailing newline`.

Signed-off-by: Andrey Butusov <[email protected]>
Error: `for loop can be changed to use an integer range (Go 1.22+)`.

Signed-off-by: Andrey Butusov <[email protected]>
Error: `Error return value is not checked`.

Signed-off-by: Andrey Butusov <[email protected]>
Error: `Non-wrapping format verb for fmt.Errorf. Use `%w` to format errors`
and `comparing with != || == will fail on wrapped errors. Use errors.Is to
check for a specific error`.

Signed-off-by: Andrey Butusov <[email protected]>
@roman-khimov roman-khimov merged commit a385b78 into master Sep 24, 2024
18 of 21 checks passed
@roman-khimov roman-khimov deleted the clean-code branch September 24, 2024 19:33
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.

4 participants