-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
tools: Add unparam linter #1443
Conversation
e583ed2
to
cd9b0b0
Compare
unparam detects unused parameters in functions, and a parameter to a function which only ever takes on one value. The latter is an indication that more tests are required. There are many nolints in this PR, as I believe that writing tests to fix alot of these situations is out of scope for this PR / it will be changed in future commits. There are some nolints for when we have to comply to normal api's.
cd9b0b0
to
cc2b179
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1443 +/- ##
==========================================
Coverage ? 63.09%
==========================================
Files ? 118
Lines ? 6563
Branches ? 0
==========================================
Hits ? 4141
Misses ? 2151
Partials ? 271 |
Amazing - it's shocking how many parameters where left behind - I think this linter is going to save a lot of energy for us. |
p.s. this is hilariously annoying updating the branch and then waiting for it to pass, and then having to update the branch again - wish there was a "run tests and if they pass, merge immediately" button |
Not sure why upload coverage hasn't terminated :/ |
* tools: Add unparam linter unparam detects unused parameters in functions, and a parameter to a function which only ever takes on one value. The latter is an indication that more tests are required. There are many nolints in this PR, as I believe that writing tests to fix alot of these situations is out of scope for this PR / it will be changed in future commits. There are some nolints for when we have to comply to normal api's. * crypto/keys no longer used by x/gov/client/rest/rest.go
unparam detects unused parameters in functions, and a parameter to
a function which only ever takes on one value. The latter is an
indication that more tests are required.
There are many nolints in this PR, as I believe that writing tests
to fix alot of these situations is out of scope for this PR / it
will be changed in future commits. There are some nolints for
when we have to comply to normal api's.
ref #1417 , closes #1084