-
Notifications
You must be signed in to change notification settings - Fork 105
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
community: cleanup code, reduce complexity, add make targets #368
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adds a make target `lint` that will be used to run enabled linters, which are configured via .golangci.yaml . Initially only the default linters are enabled, additionally the gocyclo linter with ccn > 10. Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
Adds a `test` target to the Makefile that executes the go tests. Signed-off-by: Daniel Hiller <[email protected]>
Adds unit tests for sig validation as precondition of refactoring. Signed-off-by: Daniel Hiller <[email protected]>
* reduce complexity by converting all groups into a single map * replace if then with early return * extract validateLeads, use that in two places Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
ab42c5f
to
4471b16
Compare
Based on PR kubevirt/community#368 where new make targets test and lint are introduced we are adding new presubmit jobs that execute them. Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
Based on PR kubevirt/community#368 where new make targets test, lint and coverage are introduced we are adding new presubmit jobs that execute them. Signed-off-by: Daniel Hiller <[email protected]>
/cc @EdDev for wg-code-quality |
@aburdenthehand: GitHub didn't allow me to request PR reviews from the following users: for. Note that only kubevirt members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
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-sigs/prow repository. |
What this PR does / why we need it:
Reduces complexity in:
validators/cmd/sigs-validator
generators/cmd/devstats
Adds make targets:
lint
- will run golangci-lint, additionally gocyclo with> 10
test
- will run go tests/kind cleanup
/wg code-quality
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer: