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

Changed linter and lint fixes #246

Merged
merged 2 commits into from
Oct 11, 2018
Merged

Changed linter and lint fixes #246

merged 2 commits into from
Oct 11, 2018

Conversation

richardcase
Copy link
Contributor

@richardcase richardcase commented Oct 10, 2018

Description

Changed the linter from gometalinter to GolangCI-Lint as it is faster
and the configuration and output are better.

Fixed issues highlighted by the new linter. The following
linters have been disabled and should be enabled in the future:

  • gocyclo
  • lll
  • gosec

This is further to work already carried out in #206

Checklist

  • Code compiles correctly (i.e make build)
  • Added tests that cover your change (if possible)
  • All tests passing (i.e. make test)
  • Added/modified documentation as required (such as the README)
  • Added yourself to the humans.txt file

@errordeveloper
Copy link
Contributor

CI seems unhappy - any ideas? IIRC, we have CGO disabled, so is that why we are getting some CGO weirdness there?

@richardcase
Copy link
Contributor Author

@errordeveloper - yeah i thought from the message it may bbe because CGO is disabbled. I'm going to have a look this morning.

@errordeveloper
Copy link
Contributor

We have CGO_ENABLED=0, but only when build releases:

.goreleaser.yml:      - CGO_ENABLED=0

@errordeveloper
Copy link
Contributor

I've enabled GolangCI, let's see how it works. But for now, I'd just stick to what we have, I don't think gometalinter is that slow. If we could just make GolangCI do its job, it'd be fine by me to use it along the side with current CircleCI setup.

@errordeveloper
Copy link
Contributor

Here is an idea: let's merge this changes, but without enabling new linter in CircleCI =)

@errordeveloper
Copy link
Contributor

I like this, now we have some CI redundancy and GolangCI reported before CircleCI jobs finished, because it doesn't run unit tests.

@errordeveloper errordeveloper force-pushed the linter-change branch 2 times, most recently from c36d8a4 to 13500a2 Compare October 11, 2018 15:12
Changed the linter from gometalinter to [GolangCI-Lint](
https://github.com/golangci/golangci-lint) as it is faster
and the configuration and output are better.

Fixed issue highlighted by the new linter. The following
linters have been disabled and should be enabled in the future:

- gocyclo
- lll
- gosec

This is further to work already carried out in #206

Signed-off-by: Richard Case <richard.case@outlook.com>
@richardcase
Copy link
Contributor Author

Nice, thats an even better idea

@errordeveloper errordeveloper merged commit 4a44c8a into master Oct 11, 2018
@errordeveloper errordeveloper deleted the linter-change branch October 11, 2018 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants