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

refactor code using golangci-lint #2362

Merged
merged 1 commit into from Feb 15, 2024

Conversation

kpango
Copy link
Collaborator

@kpango kpango commented Feb 15, 2024

Description

SSIA

Related Issue

Versions

  • Go Version: 1.22.0
  • Docker Version: 20.10.8
  • Kubernetes Version: v1.29.2
  • NGT Version: 2.1.6

Checklist

Special notes for your reviewer

Signed-off-by: kpango <kpango@vdaas.org>
@kpango kpango requested review from a team, hlts2 and ykadowak and removed request for a team February 15, 2024 08:34
@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@vdaas-ci
Copy link
Collaborator

[WARNING:INTCFG] Changes in interal/config may require you to change Helm charts. Please check.

@@ -265,13 +265,13 @@ func TestNewDialer(t *testing.T) {
return errors.Errorf("got: \"%+v\" is not a dialer", gotDer)
}
// skipcq: VET-V0008
//nolint: govet,copylocks
//nolint:govet,copylocks
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:govet,copylocks is unused for linter "govet" (nolintlint)

if diff := comparator.Diff(*want, *got,
// skipcq: VET-V0008
//nolint: govet,copylocks
//nolint:govet,copylocks
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:govet,copylocks is unused for linter "govet" (nolintlint)

comparator.IgnoreFields(*want, "dialer", "der", "addrs", "dnsCachedOnce", "dnsCache", "ctrl", "tmu"),
// skipcq: VET-V0008
//nolint: govet,copylocks
//nolint:govet,copylocks
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:govet,copylocks is unused for linter "govet" (nolintlint)

@@ -22,8 +22,10 @@ import (
type Option func(*correct) error

var defaultOpts = []Option{
WithStreamListConcurrency(200), //nolint:gomnd
WithKvsAsyncWriteConcurrency(2048), //nolint:gomnd
//nolint:gomnd
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:gomnd is unused for linter "gomnd" (nolintlint)

WithKvsAsyncWriteConcurrency(2048), //nolint:gomnd
//nolint:gomnd
WithStreamListConcurrency(200),
//nolint:gomnd
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:gomnd is unused for linter "gomnd" (nolintlint)

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (82380d8) 18.70% compared to head (6803ba4) 18.70%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2362   +/-   ##
=======================================
  Coverage   18.70%   18.70%           
=======================================
  Files         548      548           
  Lines       73641    73640    -1     
=======================================
+ Hits        13776    13778    +2     
+ Misses      59132    59128    -4     
- Partials      733      734    +1     

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

Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

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

LGTM!

@kpango kpango merged commit 915a670 into main Feb 15, 2024
177 of 178 checks passed
@kpango kpango deleted the refactor/lint/refactor-by-golangci-lint-autofix branch February 15, 2024 10:22
vdaas-ci pushed a commit that referenced this pull request Feb 15, 2024
Signed-off-by: kpango <kpango@vdaas.org>
kpango added a commit that referenced this pull request Feb 15, 2024
Signed-off-by: kpango <kpango@vdaas.org>
Co-authored-by: Yusuke Kato <kpango@vdaas.org>
kpango added a commit that referenced this pull request Feb 19, 2024
🔖 🤖 Release v1.7.11 (#2360) (#2361)
Change docker scan timeout longer (#2363)
refactor code using golangci-lint (#2362)
Create SECURITY.md (#2367)
add commit hash build image (#2359)
Make agent export index metrics to Pod k8s resource (#2319)
update docker build target platform selection rules (#2370)
improve Backport Pull Request Title & Description Quality (#2373)
update deps & re-generate k8s templates

Signed-off-by: kpango <kpango@vdaas.org>
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.

None yet

4 participants