Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Go coding style #693

Merged
merged 7 commits into from
Jun 23, 2017
Merged

Go coding style #693

merged 7 commits into from
Jun 23, 2017

Conversation

seanknox
Copy link
Contributor

@seanknox seanknox commented May 30, 2017

This introduces go coding standards to the project and automation to run as part of CI and tests to enforce them.

  • Add documentation that the project follows Go coding style standards closely so go fmt can take care of most formatting issues and end bike shedding.

  • We should also follow the conventions recommended by go lint and gometalinter.

  • make test-style runs static validations and linting checks

  • Address all static validation and linting errors

  • make ci also runs test-style

Fixes #692


This change is Reviewable

@seanknox seanknox added this to the v0.1.0 milestone May 30, 2017
@seanknox seanknox force-pushed the go_coding_style branch 2 times, most recently from a3026bc to 726b433 Compare May 30, 2017 20:26
Makefile Outdated
@@ -23,7 +23,7 @@ _build:
go build -v -ldflags="-X github.com/Azure/acs-engine/cmd.BuildSHA=${VERSION} -X github.com/Azure/acs-engine/cmd.BuildTime=${BUILD}"
cd test/acs-engine-test; go build -v

build: prereqs _build
build: _build
Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well remove _build and replace with build. I had kept build so that a naive make or make build would work out of the box. If build doesn't automatically invoke glide, then the user has to know to run an additional step. But I'm fine with it either way.

Copy link
Contributor

@colemickens colemickens left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@anhowe anhowe left a comment

Choose a reason for hiding this comment

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

lgtm

@seanknox
Copy link
Contributor Author

@acs-bot test this please

@seanknox
Copy link
Contributor Author

Rebased off of master and removed the _build Makefile target per Cole's comment.

@seanknox
Copy link
Contributor Author

@acs-bot test this please

@seanknox seanknox merged commit fb09cdf into master Jun 23, 2017
@seanknox seanknox deleted the go_coding_style branch June 23, 2017 16:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define go conventions and add automation to enforce in tests/CI
7 participants