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

🌱 Add golangci-lint github workflow #1394

Merged

Conversation

kashifest
Copy link
Member

@kashifest kashifest commented Oct 12, 2023

This PR will add golangci-lint github workflow. Currently only the following linters are enabled

- asciicheck
- bodyclose
- dogsled
- exportloopref

The plan is to enable the rest in batches to ease the code changes and review.

@metal3-io-bot metal3-io-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 12, 2023
@kashifest kashifest force-pushed the add/golangci-lint-workflow-kashif branch from 4ed8a44 to 7436cb9 Compare November 3, 2023 07:50
@metal3-io-bot metal3-io-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 3, 2023
@metal3-io-bot metal3-io-bot added the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Nov 14, 2023
@kashifest kashifest force-pushed the add/golangci-lint-workflow-kashif branch from 7436cb9 to 06629b1 Compare January 9, 2024 11:04
@metal3-io-bot metal3-io-bot removed the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Jan 9, 2024
@kashifest kashifest force-pushed the add/golangci-lint-workflow-kashif branch from 06629b1 to 303ded5 Compare January 9, 2024 12:27
Signed-off-by: Kashif Khan <kashif.khan@est.tech>
@kashifest kashifest force-pushed the add/golangci-lint-workflow-kashif branch from 303ded5 to 3a0d856 Compare January 9, 2024 12:28
@kashifest kashifest changed the title WIP: Add golangci-lint github workflow 🌱 WIP: Add golangci-lint github workflow Jan 9, 2024
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 9, 2024
@kashifest kashifest force-pushed the add/golangci-lint-workflow-kashif branch from 3a0d856 to 6301497 Compare January 9, 2024 14:02
@kashifest
Copy link
Member Author

/test-ubuntu-integration-main
/test-centos-e2e-integration-main
/metal3-bmo-e2e-test

@kashifest kashifest force-pushed the add/golangci-lint-workflow-kashif branch 3 times, most recently from 86108f0 to 5d2665f Compare January 9, 2024 15:55
Signed-off-by: Kashif Khan <kashif.khan@est.tech>
@kashifest kashifest force-pushed the add/golangci-lint-workflow-kashif branch from 5d2665f to d7229e2 Compare January 9, 2024 15:56
@metal3-io-bot
Copy link
Contributor

metal3-io-bot commented Jan 9, 2024

@kashifest: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
markdownlint 7436cb9 link true /test markdownlint

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.

# - typecheck
# - unconvert
# - unused
# - whitespace
Copy link
Member Author

Choose a reason for hiding this comment

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

These linters are commented out since the changes required in the code are overwhelming. I plan to enable them in batches so that its easy to change and also easy to review.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. There are years of cruft to be fixed, easier to do and also to review in batches.

@kashifest
Copy link
Member Author

/test-ubuntu-integration-main
/test-centos-e2e-integration-main
/metal3-bmo-e2e-test

@kashifest kashifest changed the title 🌱 WIP: Add golangci-lint github workflow 🌱 Add golangci-lint github workflow Jan 9, 2024
@kashifest
Copy link
Member Author

/cc @lentzi90 @tuminoid

Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

One question, otherwise looking good to me.

.github/workflows/golangci-lint.yml Show resolved Hide resolved
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 10, 2024
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

/lgtm
Great job!

@kashifest
Copy link
Member Author

/cc @honza

@tuminoid
Copy link
Member

/assign @zaneb @dtantsur
Can we get an approval for this before it rots? There is years of dirt to fix as the old linter skipped most of the code.

@zaneb
Copy link
Member

zaneb commented Jan 17, 2024

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zaneb

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

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 17, 2024
@metal3-io-bot metal3-io-bot merged commit 51e8da1 into metal3-io:main Jan 17, 2024
30 checks passed
@metal3-io-bot metal3-io-bot deleted the add/golangci-lint-workflow-kashif branch January 17, 2024 02:47
@kashifest
Copy link
Member Author

/cherry-pick release-0.5

@metal3-io-bot
Copy link
Contributor

@kashifest: new pull request created: #1600

In response to this:

/cherry-pick release-0.5

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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants