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

Fix indentation/spacing in comments to render correctly in godoc #114559

Merged
merged 1 commit into from Dec 18, 2022

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Dec 18, 2022

What type of PR is this?

/kind cleanup
/kind documentation

What this PR does / why we need it:

Fixes incorrect indentation/line breaks inserted by go1.19 gofmt

Fixes #111701

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 18, 2022
@k8s-ci-robot k8s-ci-robot added area/apiserver area/cloudprovider area/code-generation area/kubeadm area/kubelet kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 18, 2022
@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@dims
Copy link
Member

dims commented Dec 18, 2022

@liggitt what are you running to fix these back?

@liggitt
Copy link
Member Author

liggitt commented Dec 18, 2022

Scanned the changes in the original PR and manually fixed wrong ones.

Gofmt weirdly indented lines that continued and indented a space. I just deleted the blank line it inserted and made the continuation be at the same indent level

@dims
Copy link
Member

dims commented Dec 18, 2022

thanks @liggitt ! i can confirm that you indeed did that :)

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 18, 2022
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b55eddcbea01d9cb63c0ab64464e851110934117

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, liggitt

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

@liggitt
Copy link
Member Author

liggitt commented Dec 18, 2022

/retest

@k8s-ci-robot k8s-ci-robot merged commit 76522eb into kubernetes:master Dec 18, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Dec 18, 2022
@cici37
Copy link
Contributor

cici37 commented Dec 20, 2022

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 20, 2022
@tengqm
Copy link
Contributor

tengqm commented Dec 21, 2022

Looks like gofmt is attempting to "fix" indentation in comments by inserting TABs. That is a weird behavior.

@liggitt
Copy link
Member Author

liggitt commented Dec 21, 2022

Looks like gofmt is attempting to "fix" indentation in comments by inserting TABs. That is a weird behavior.

it is treating the subsequent indented lines as list items or code blocks, and indenting them with a separating line break to set them apart from the preceding text and make it clearer how the comments will actually be interpreted.

See https://tip.golang.org/doc/go1.19#go-doc and https://tip.golang.org/doc/comment for details

@liggitt liggitt deleted the gofmt branch May 9, 2023 18:26
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. area/apiserver area/cloudprovider area/code-generation area/kubeadm area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix godocs autoformatting from upgrading to go 1.19
6 participants