Skip to content

Conversation

apelisse
Copy link
Contributor

Especially when the struct is in a list because:

	- a: 1
	  b: 2

panics because of mixed spaces and tabs. A working alternative is to
indent with tabs, but I don't think it's very pleasant:

	- a: 1
		b: 2

Update the code so that prefixed tabs from the first line are removed
from all consecutive lines, and keep it that simple.

/assign @lavalamp @jennybuckley @kwiesmueller

Especially when the struct is in a list because:
```yaml
	- a: 1
	  b: 2
```
panics because of mixed spaces and tabs. A working alternative is to
indent with tabs, but I don't think it's very pleasant:
```yaml
	- a: 1
		b: 2
```

Update the code so that prefixed tabs from the first line are removed
from all consecutive lines, and keep it that simple.
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 14, 2019
@lavalamp
Copy link
Contributor

I don't care that much whether we use tabs or spaces, but doesn't mixing them feel pretty bad? Specifically it means you could use tabs on one line and spaces on the next, and even though that would (might!) look visually very different, it'd mean the same thing? We don't have gofmt helping us out here.

(I don't care enough to write more than this about it though :) )

@jennybuckley
Copy link

I think this has value in making the tests more readable. I don't think it would allow you to use tabs on one line and spaces on the next, it just trims the same number of tabs off the beginning of each line, and yaml will expect all spaces after that, right?

@jennybuckley
Copy link

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 14, 2019
@jennybuckley jennybuckley merged commit 3f6c1e0 into kubernetes-sigs:master Feb 14, 2019
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants