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

minor consistency fixes #1094

Merged
merged 2 commits into from
Jul 22, 2019
Merged

Conversation

EliZucker
Copy link
Member

Changes

  1. Attempt to make bracket usage consistent across testing. To give some background, in an earlier PR, I wrote some validation tests, and kept the additional tests in line with the existing tests in that file. However, I got feedback that I should collapse the brackets, so I had to change the existing tests in that file as well to match that formatting. I'm not sure if Tekton has decided on that type of styling rule, but IMO it's probably a good idea to keep them consistent so that users aren't forced to either arbitrarily follow one of the existing styles (increasing the project inconsistency), or refactor the entire existing test file themselves.

  2. Adjust taskrunpod files to match gofmt results. When runnning gofmt, those 3 files are the only ones that need adjustment. It's interesting that build-tests didn't see that (I assumed it checked linting but I'm probably wrong). It's possible that that it only checks for differences in the generated files or my computer somehow has a different gofmt version.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

Running gofmt on pipelines is completely clean, except for these 3 files
which don't match GoLang's linting rules. This commit cleans that up.
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Jul 16, 2019
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 16, 2019
Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 16, 2019
@afrittoli
Copy link
Member

Thanks for this. I think it's a good idea to keep the style consistent; I feel however that unless we enforce it via CI there will more PR like this one needed in the future.
Is there a way to enforce the test formatting automatically?

@bobcatfish
Copy link
Collaborator

hahaha take that @dlorenc 😜

@EliZucker
Copy link
Member Author

Thanks for this. I think it's a good idea to keep the style consistent; I feel however that unless we enforce it via CI there will more PR like this one needed in the future.
Is there a way to enforce the test formatting automatically?

Not sure about the brackets, but I think the tests can be modified to at least verify that gofmt doesn't suggest something different; the logic would be similar to the current codegen enforcement.

@bobcatfish
Copy link
Collaborator

Thanks for this. I think it's a good idea to keep the style consistent; I feel however that unless we enforce it via CI there will more PR like this one needed in the future.
Is there a way to enforce the test formatting automatically?

If someone can find a tool that'll check for this that we can add to our linting then I'm all for it! This feels to me like a minor enough thing that it's not worth putting too much time into tho.

( @EliZucker would probably be worth writing up an issue in our dogfooding epic #267 about making sure we are running go fmt !)

/approve
/meow space

@tekton-robot
Copy link
Collaborator

@bobcatfish: cat image

In response to this:

Thanks for this. I think it's a good idea to keep the style consistent; I feel however that unless we enforce it via CI there will more PR like this one needed in the future.
Is there a way to enforce the test formatting automatically?

If someone can find a tool that'll check for this that we can add to our linting then I'm all for it! This feels to me like a minor enough thing that it's not worth putting too much time into tho.

( @EliZucker would probably be worth writing up an issue in our dogfooding epic #267 about making sure we are running go fmt !)

/approve
/meow space

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.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bobcatfish, dibyom, EliZucker

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2019
@tekton-robot tekton-robot merged commit 75bd14f into tektoncd:master Jul 22, 2019
@EliZucker EliZucker deleted the organizationchange branch July 22, 2019 14:14
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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit 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.

6 participants