andygrunwald / go-gerrit

Go client/library for Gerrit Code Review
https://godoc.org/github.com/andygrunwald/go-gerrit
MIT License
96 stars 40 forks source link

Implement Static Analysis and Fix Bugs #38

Closed opalmer closed 7 years ago

opalmer commented 7 years ago

This PR adds gometalinter to the project and fixes problems it has found in the process. This PR was created in response to comments made on #37 by @shurcooL to not only make the requested fixes but ensure we don't have these kinds of issues again in the future.

The changes introduced in this PR are documented in the CHANGELOG.

codecov-io commented 7 years ago

Codecov Report

Merging #38 into master will decrease coverage by 0.27%. The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
- Coverage   18.06%   17.79%   -0.28%     
==========================================
  Files          21       21              
  Lines        1738     1742       +4     
==========================================
- Hits          314      310       -4     
- Misses       1394     1398       +4     
- Partials       30       34       +4
Impacted Files Coverage Δ
changes.go 4.63% <ø> (ø) :arrow_up:
types.go 92.85% <ø> (ø) :arrow_up:
changes_revision.go 0% <0%> (ø) :arrow_up:
groups_include.go 0% <0%> (ø) :arrow_up:
changes_edit.go 0% <0%> (ø) :arrow_up:
events.go 69.23% <100%> (ø) :arrow_up:
authentication.go 76% <33.33%> (-7.34%) :arrow_down:
gerrit.go 81.95% <55.55%> (-0.9%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 195c9cf...709c69f. Read the comment docs.

opalmer commented 7 years ago

@andygrunwald / @shurcooL please take a look. The only change here that might be worth reverting/working around is testing against Go 1.5. That said if the tests pass on other versions of Go they should pass on 1.5 too (we just can't lint against 1.5).

andygrunwald commented 7 years ago

Thanks a lot for this. Dropping Go 1.5 is fine for me. Go 1.6 is out for quite some time.

This covers a few bugs and fixes them. Really nice. Thanks for your work @opalmer and for triggering this @shurcooL