Skip to content

Fix linter errors thrown by maligned and interfacer#3959

Merged
melekes merged 22 commits intotendermint:masterfrom
PSalant726:go-green/maligned-interfacer
Oct 1, 2019
Merged

Fix linter errors thrown by maligned and interfacer#3959
melekes merged 22 commits intotendermint:masterfrom
PSalant726:go-green/maligned-interfacer

Conversation

@PSalant726
Copy link
Contributor

  • Referenced an issue explaining the need for the change

This PR repairs linter errors seen when running the following commands:
golangci-lint run --no-config --disable-all=true --enable=maligned
golangci-lint run --no-config --disable-all=true --enable=interfacer

Contributes to #3262

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

Thanks for contributing to Tendermint 👍

@PSalant726 PSalant726 force-pushed the go-green/maligned-interfacer branch from 796e685 to 46d0c86 Compare September 10, 2019 00:21
@melekes
Copy link
Contributor

melekes commented Sep 14, 2019

libs/flowrate/io_test.go:84:10: cannot use start (type time.Time) as type int64 in field value
libs/flowrate/io_test.go:84:35: cannot use 0 (type int) as type time.Time in field value
libs/flowrate/io_test.go:85:10: cannot use start (type time.Time) as type int64 in field value
libs/flowrate/io_test.go:85:17: cannot use _100ms (type time.Duration) as type int64 in field value
libs/flowrate/io_test.go:85:45: cannot use 100 (type int) as type time.Time in field value
libs/flowrate/io_test.go:86:10: cannot use start (type time.Time) as type int64 in field value
libs/flowrate/io_test.go:86:17: cannot use _200ms (type time.Duration) as type int64 in field value
libs/flowrate/io_test.go:86:25: cannot use _100ms (type time.Duration) as type int64 in field value
libs/flowrate/io_test.go:86:50: cannot use 100 (type int) as type time.Time in field value
libs/flowrate/io_test.go:87:10: cannot use start (type time.Time) as type int64 in field value
libs/flowrate/io_test.go:87:10: too many errors

@codecov-io
Copy link

Codecov Report

Merging #3959 into master will decrease coverage by 0.06%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #3959      +/-   ##
==========================================
- Coverage    66.6%   66.53%   -0.07%     
==========================================
  Files         225      225              
  Lines       18737    18737              
==========================================
- Hits        12480    12467      -13     
- Misses       5321     5334      +13     
  Partials      936      936
Impacted Files Coverage Δ
libs/flowrate/flowrate.go 82.35% <ø> (ø) ⬆️
mempool/clist_mempool.go 81.78% <ø> (ø) ⬆️
p2p/pex/known_address.go 52.94% <ø> (ø) ⬆️
state/txindex/kv/kv.go 75.48% <ø> (ø) ⬆️
blockchain/v0/pool.go 80% <ø> (-0.66%) ⬇️
p2p/pex/addrbook.go 67.83% <ø> (ø) ⬆️
tools/tm-monitor/monitor/node.go 60.34% <ø> (ø) ⬆️
tools/tm-bench/main.go 0% <0%> (ø) ⬆️
lite/proxy/proxy.go 0% <0%> (ø) ⬆️
node/node.go 63.09% <100%> (ø) ⬆️
... and 7 more

@melekes
Copy link
Contributor

melekes commented Sep 30, 2019

Can we actually enable maligned and interfacer linters in .golangci.yml file?

@melekes melekes merged commit 05075ea into tendermint:master Oct 1, 2019
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.

5 participants