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

Switch to golangci-lint #346

Merged

Conversation

cyriltovena
Copy link
Collaborator

@cyriltovena cyriltovena commented Sep 7, 2018

I've made the switch to run golang-ci instead of gometalinter.

I've added all supported and not included by default linters of gometalinters and added:

  • goimports
  • misspell

Excluded files are now automatically handled, but examples/ was also skipped so I'm running the linter twice. See documentation examples below:

 # which dirs to skip: they won't be analyzed;
  # can use regexp here: generated.*, regexp is applied on full path;
  # default value is empty list, but next dirs are always skipped independently
  # from this option's value:
  #   	vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
  skip-dirs:
    - src/external_libs
    - autogenerated_by_my_lib

  # which files to skip: they will be analyzed, but issues from them
  # won't be reported. Default value is empty list, but there is
  # no need to include all autogenerated files, we confidently recognize
  # autogenerated files. If it's not please let us know.
  skip-files:
    - ".*\\.my\\.go$"
    - lib/bad.go

Found some interesting issues (typo and goimports) but also some false positives (dupl).

We should have this tools included in our IDE (there is vs-code support).

Closes #187
Closes #237

@cyriltovena cyriltovena added the area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. label Sep 7, 2018
@cyriltovena cyriltovena added this to the 0.5.0 milestone Sep 7, 2018
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 9d7ee559-d2f4-4f95-ad9c-a20a3ef15ebc

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

(experimental) To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/346/head:pr_346 && git checkout pr_346
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.5.0-65cda51

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

A couple of minor its, and a question.

But overall, this looks like this does a better job than gometalinter for linting, and locks it to a version AND runs faster. 👍 🏅

examples/simple-udp/main.go Show resolved Hide resolved
pkg/gameservers/portallocator_test.go Show resolved Hide resolved
sdks/go/sdk.go Outdated Show resolved Hide resolved
sdks/go/sdk_test.go Outdated Show resolved Hide resolved
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: cf70a62d-23ed-4a57-aac2-c64ffad3b6a8

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

(experimental) To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/346/head:pr_346 && git checkout pr_346
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.5.0-db904c3

@markmandel markmandel merged commit 2d8c351 into googleforgames:master Sep 8, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants