kubebuilder icon indicating copy to clipboard operation
kubebuilder copied to clipboard

Trailing spaces in generated README.md

Open bzub opened this issue 1 year ago • 1 comments
trafficstars

What broke? What's expected?

After running kubebuilder init some lines in the README.md contain trailing whitespace.

Reproducing this issue

Run kubebuilder init.

KubeBuilder (CLI) Version

3.14.0

PROJECT version

3

Plugin versions

go.kubebuilder.io/v4

Other versions

No response

Extra Labels

No response

bzub avatar Mar 06 '24 17:03 bzub

Would be interesting top consider adding https://editorconfig.org/ to the project to avoid this in the future?

Example configuration we use https://github.com/migtools/oadp-non-admin/blob/master/.editorconfig

mateusoliveira43 avatar Mar 06 '24 18:03 mateusoliveira43

Hi @mateusoliveira43

We can sort it out using shell script. Note that we try as much as possible not add dependencies with third-part. Use third-party solutions usually increase the effort to keep things maintained, it ofen make hard for contributors as well since to do something they might to skill up with so many other solutions.

Ideally, we should when we run make generate remove ALL trailing spaces of the docs for example. Feel free to check it out if you wish and proposed a solution

camilamacedo86 avatar Mar 29 '24 18:03 camilamacedo86

@bzub @mateusoliveira43

See now we can solve it across the whole project when we run make generate Also, now we are checking of the spaces so we will not get merged stuff with trailing spaces.

See: https://github.com/kubernetes-sigs/kubebuilder/pull/3826

camilamacedo86 avatar Mar 29 '24 20:03 camilamacedo86

Nice solution @camilamacedo86 Thanks!

mateusoliveira43 avatar Mar 30 '24 13:03 mateusoliveira43