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

Bug 1948998: style fixes by GoLand and golangci-lint #395

Merged
merged 4 commits into from
Apr 14, 2021

Conversation

Serhii1011010
Copy link
Contributor

@Serhii1011010 Serhii1011010 commented Apr 12, 2021

Run golangci-lint run --skip-dirs-use-default --fix, clicked a few auto-fix buttons in GoLand, and checked it manually.

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others - refactoring

Unit Tests

Some unit tests were affected, it changed code structure, but not the logic.

References

https://issues.redhat.com/browse/???
https://bugzilla.redhat.com/show_bug.cgi?id=1948998
https://access.redhat.com/solutions/???

Ricardo Lüders and others added 3 commits April 12, 2021 10:44
This fixes the precommit hook that was not working as expected giving some false deadcode error when checking single files.
This adds the information about the golanglint-ci version required.
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2021
".dockerconfigjson": nil,
}},
supportKey: &corev1.Secret{Data: map[string][]byte{
supportKey: {Data: map[string][]byte{
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I think I like the explicit definition more.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know. I think that, once the parent object is already a corev1.Secret by doing it two times, it is just overhead. So, IMHO, the change looks good.

if err != nil {
t.Fatal("unable to create fake netnamespace", err)
}
t.Fatal("unable to create fake netnamespace", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Lol...this was probably my work.

Copy link
Contributor

@rluders rluders left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2021
@Serhii1011010 Serhii1011010 changed the title style fixes by GoLand and golangci-lint Bug 1948998: style fixes by GoLand and golangci-lint Apr 13, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Apr 13, 2021
@openshift-ci-robot
Copy link
Contributor

@Sergey1011010: This pull request references Bugzilla bug 1948998, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @psimovec

In response to this:

Bug 1948998: style fixes by GoLand and golangci-lint

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.

@openshift-ci-robot
Copy link
Contributor

@Sergey1011010: This pull request references Bugzilla bug 1948998, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @psimovec

In response to this:

Bug 1948998: style fixes by GoLand and golangci-lint

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.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2021
@rluders
Copy link
Contributor

rluders commented Apr 13, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rluders, Sergey1011010

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Sergey1011010,rluders]

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

@rluders rluders mentioned this pull request Apr 13, 2021
4 tasks
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@rluders
Copy link
Contributor

rluders commented Apr 14, 2021

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 4d8bee9 into openshift:master Apr 14, 2021
@openshift-ci-robot
Copy link
Contributor

@Sergey1011010: All pull requests linked via external trackers have merged:

Bugzilla bug 1948998 has been moved to the MODIFIED state.

In response to this:

Bug 1948998: style fixes by GoLand and golangci-lint

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants