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 digeser to fix sonarClaud issue #1080

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

nunnatsa
Copy link
Collaborator

In order to reduce the number of the "critical" sonarClaud warning, the PR fixes the following warning:

In tools/digester/main.go: Refactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.

Signed-off-by: Nahshon Unna-Tsameret [email protected]

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jan 21, 2021
@hco-bot
Copy link
Collaborator

hco-bot commented Jan 21, 2021

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp

In response to this:

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 21, 2021

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp

In response to this:

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

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.

@nunnatsa nunnatsa requested a review from tiraboschi January 21, 2021 19:34
@zcahana
Copy link
Contributor

zcahana commented Jan 25, 2021

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2021
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zcahana

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:

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2021
@zcahana
Copy link
Contributor

zcahana commented Jan 25, 2021

@nunnatsa see the above comment about invalid commit message preventing this from being merged.

In tools/csv-merger/csv-merger.go:
* Rename function gen_hco_crds to match the regular expression ^(_|[a-zA-Z0-9]+)$
* Define a constant instead of duplicating this literal "alm-examples" 3 times
* 8 X Rename this local variable to match the regular expression "^(_|[a-zA-Z0-9]+)$".Why is this an issue?
* func validateNoApiOverlap: Refactor this method to reduce its Cognitive Complexity from 41 to the 15 allowed.

In `tools/digester/main.go`:
* Refactor digeser to fix sonarClaud issue: Refactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.

Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
@kubevirt-bot kubevirt-bot removed lgtm Indicates that a PR is ready to be merged. do-not-merge/invalid-commit-message labels Jan 25, 2021
@nunnatsa
Copy link
Collaborator Author

@nunnatsa see the above comment about invalid commit message preventing this from being merged.

Done. Please check again.

@zcahana
Copy link
Contributor

zcahana commented Jan 25, 2021

Re-lgtm'ing since the latest push is just a commit-msg edit.
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2021
@hco-bot
Copy link
Collaborator

hco-bot commented Jan 25, 2021

hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure
hco-e2e-upgrade-prev-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-azure, ci/prow/hco-e2e-upgrade-prev-azure

In response to this:

hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure
hco-e2e-upgrade-prev-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-azure

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
Copy link

openshift-ci bot commented Jan 25, 2021

@nunnatsa: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/hco-e2e-image-index-gcp a72c589 link /test hco-e2e-image-index-gcp

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@nunnatsa
Copy link
Collaborator Author

/override-bot

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 25, 2021

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp

In response to this:

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

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.

@kubevirt-bot kubevirt-bot merged commit 54830b6 into kubevirt:master Jan 25, 2021
@nunnatsa nunnatsa deleted the more-sonar-fix branch January 25, 2021 12:57
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants