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

Add formatting guidelines to CONTRIBUTING.md #205

Merged
merged 2 commits into from
May 16, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ Participation in this project comes under the [Contributor Covenant Code of Cond
- Once review has occurred, please rebase your PR down to a single commit. This will ensure a nice clean Git history.
- Finally - *Thanks* for considering submitting code to Agones!

## Formatting

When submitting pull requests, make sure to do the following:

- Format all Go code with [gofmt](https://golang.org/cmd/gofmt/).
Copy link
Member

Choose a reason for hiding this comment

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

gofmt and/or goimport ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm. Technically gofmt, but you'd be mad to write your own import statements and not use goimports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about another sentence after this one that says, "Many people use goimports which adds import statements automatically while also running gofmt"?

Copy link
Member

Choose a reason for hiding this comment

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

SGTM.

- Remove trailing whitespace. Many editors will do this automatically.
- Ensure any new files have [a trailing newline](https://stackoverflow.com/questions/5813311/no-newline-at-end-of-file)

## Continuous Integration

Continuous integration is provided by [Google Cloud Container Builder](https://cloud.google.com/container-builder/),
Expand All @@ -46,17 +54,17 @@ how to edit and expand the build process.

#### Kubernetes

- [Kubernetes Custom Resources](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) -
This is how we define our own resource names (`GameServer`, etc) within Kubernetes.
- [Kubernetes Custom Resources](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) -
This is how we define our own resource names (`GameServer`, etc) within Kubernetes.
- [Joe Beda's TGIK Controller](https://github.com/jbeda/tgik-controller) -
[Joe Beda](https://twitter.com/jbeda) did a video series on writing controllers for Kubernetes.
[Joe Beda](https://twitter.com/jbeda) did a video series on writing controllers for Kubernetes.
**This is the best resource for learning about controllers and Kubernetes.**
- [Kubernetes Sample Controller](https://github.com/kubernetes/sample-controller) -
Example of a Custom Resources with a Kubernetes Controller.
- [Kubernetes Code Generator](https://github.com/kubernetes/code-generator) -
The tooling that generated the Go libraries for the Custom Resource we define

#### Coding and Development

- [How to write a good Git Commit message](https://chris.beams.io/posts/git-commit/) -
Great way to make sure your Pull Requests get accepted.
Great way to make sure your Pull Requests get accepted.