-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
🌱 (ci): Add linter for the samples scaffolded under docs #4464
base: master
Are you sure you want to change the base?
🌱 (ci): Add linter for the samples scaffolded under docs #4464
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jongwooo 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 |
/retitle 🌱 (ci): Add linter for the samples scaffolded under docs |
This commit change the action to add linter for the samples scaffolded under docs Signed-off-by: Jongwoo Han <[email protected]>
6784efa
to
782e274
Compare
@jongwooo: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@@ -129,7 +129,7 @@ var _ = Describe("CronJob controller", func() { | |||
By("By checking the CronJob has zero active Jobs") | |||
Consistently(func(g Gomega) { | |||
g.Expect(k8sClient.Get(ctx, cronjobLookupKey, createdCronjob)).To(Succeed()) | |||
g.Expect(createdCronjob.Status.Active).To(HaveLen(0)) | |||
g.Expect(createdCronjob.Status.Active).To(HaveLen(0)) // nolint:ginkgolinter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @jongwooo
to apply changes to these files, you need to change code in hack/docs/internal
folder, and then run make generate
.
For example, for this line, you need to change it here
g.Expect(createdCronjob.Status.Active).To(HaveLen(0)) |
@@ -96,6 +97,7 @@ var ( | |||
// | |||
// For more details, check Reconcile and its Result here: | |||
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile | |||
// nolint:gocyclo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @jongwooo
That is nice, but see that ALL samples under the docs are generated with the tools and we have a code implementation to add the code on top. They are generated automatically when we run make generate-docs
.
See: https://github.com/kubernetes-sigs/kubebuilder/tree/master/hack/docs
So, the changes on the docs need to be addressed there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change anything that change the default scaffold then we run make generate
which will re-generate the samples under testdata and the docs as well
Fixes #4445
This pull request changes the action to add a linter for the samples scaffolded under docs, reorders imports for better readability, and adds
nolint
comments to suppress specific linter warnings./cc @camilamacedo86