Skip to content

Feature/gometalinter - #176

Merged
markmandel merged 1 commit into
agones-dev:masterfrom
EricFortin:feature/gometalinter
Apr 15, 2018
Merged

markmandel merged 1 commit into
agones-dev:masterfrom
EricFortin:feature/gometalinter

Conversation

@EricFortin

Copy link
Copy Markdown
Collaborator

Fixes #163

@EricFortin
EricFortin requested a review from markmandel April 14, 2018 14:11
@agones-bot

Copy link
Copy Markdown
Collaborator

Build Succeeded 👏

Build Id: c2825c28-7857-4e75-8bd3-56d693c958ae

The following development artifacts have been built, and will exist for the next 30 days:

@markmandel
markmandel requested a review from enocom April 14, 2018 16:19

@markmandel markmandel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 some comment/thoughts on changes - but so happy to see this in place!!!!

I can see it already picked up on stuff I particularly missed, just using gometalinter manually.

Comment thread build/Makefile Outdated

# Build a static binary for the gameserver controller
build-controller-binary: ensure-build-image
build-controller-binary: ensure-build-image lint

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like lint should run on make test (here)

wdyt?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense, removed in build targets and put it in test one.

Comment thread build/Makefile Outdated

# Lint the go source code.
lint: ensure-build-image
docker run --rm $(common_mounts) -w $(mount_path) $(build_tag) bash -c \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor nit - add $(DOCKER_RUN_ARGS) to this line.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Comment thread build/gen-lint-exclude.sh
# See the License for the specific language governing permissions and
# limitations under the License.

excluded=$(find . -name "*.go" | grep -v vendor | xargs grep autogenerated | cut -d ':' -f 1 | uniq | sed 's#\./##g')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should probably go in build/build-image with the rest of the gen scripts.

Which will mean it will be automatically copied into the build Docker image so it will be easier to call.

May also want to also bump the ForceUpdate value to force the rebuild.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done and nice trick for the rebuild

Comment thread build/gen-lint-exclude.sh Outdated
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# Copyright 2017 Google Inc. All Rights Reserved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor nit - 2018

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment thread cmd/controller/main.go

// main starts the operator for the gameserver CRD
func main() {
func main() { // nolint: gocyclo

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not for this PR - but we should make a ticket for this, because we should fix this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Created #177

// main starts a UDP server that received 1024 byte sized packets at at time
// converts the bytes to a string, and logs the output
func main() {
func main() { // nolint: gocyclo

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here, we should make a ticket to fix this one too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Created #178

Comment thread pkg/testing/controller.go
return m
}

// StartInformers starts new fake informers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 it's so good to have all of this picked up

Comment thread sdks/go/sdk_test.go Outdated
assert.False(t, sm.hm.healthy)

s.Ready()
_ = s.Ready()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like these should actually be

err := s.Ready() # change
assert.Nil(t, err) # add this line
assert.True(t, sm.ready)
assert.False(t, sm.shutdown)

For all the below. Better to fix the test, since we're here (no idea why I didn't do this in the first place)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sorry for this. Totally missed it too.

@EricFortin
EricFortin force-pushed the feature/gometalinter branch from 2c69845 to a61fdc5 Compare April 14, 2018 17:46
@EricFortin

Copy link
Copy Markdown
Collaborator Author

Rebased and squashed

@agones-bot

Copy link
Copy Markdown
Collaborator

Build Succeeded 👏

Build Id: 067638c6-89dd-4568-a9ef-7e3f21d21cc3

The following development artifacts have been built, and will exist for the next 30 days:

@markmandel

Copy link
Copy Markdown
Member

This LGTM. @enocom do you have anything extra before we approve and merge this?

@enocom

enocom commented Apr 15, 2018

Copy link
Copy Markdown
Contributor

LGTM

@markmandel
markmandel merged commit 14f8329 into agones-dev:master Apr 15, 2018
@markmandel markmandel added this to the 0.2 milestone Apr 15, 2018
@markmandel markmandel added area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/feature New features for Agones labels Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/feature New features for Agones

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants