add golangci-lint#600
Conversation
|
/hold since there a bunch of stuff to be fixed |
|
oh cool, verify it's working already 😍 |
|
i love this!! |
|
Oh hum...we probably should have noticed the MCO was using |
|
Yeah, I'm not sure about even landing this for 4.1 due to the many stuff to take care of but still. Now we noticed and we can think about migrating/fixing some of this stuff. |
|
made another pass at this, changes are trivial though |
5108719 to
db00105
Compare
9ab5d36 to
9b4374b
Compare
|
Removed WIP, some linters are disabled or this PR becomes a never ending PR. After this merges, I'll open an issue for contributors and us to re-enable and fix the remaining disabled linters. Still on hold cause #603 since it's the last error for this |
|
|
|
This requires #618 in order to be consistent /hold |
|
/hold |
|
/test verify |
this is not gonna pass as we aren't and we won't be at 1.11 for now |
|
depends on openshift/release#3799 |
There was a problem hiding this comment.
@runcom qq - is it bound to a particular release ?
There was a problem hiding this comment.
i suspect it is by looking https://github.com/openshift/release/pull/3799/files so maybe the echo can be extended to mention that ... my 0.02$ though
There was a problem hiding this comment.
closed that PR as it's not needed now that we're all above go1.10 (1.12 to be precise)
There was a problem hiding this comment.
How about adding a target to install it for you? e.g.
$(GOBIN)/golangci-lint:
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
verify: $(GOBIN)/golangci-lint
There was a problem hiding this comment.
I've gona back and forth on the target (we used to have it in CRI-O as well but ended up being dropped cause the CI was taking care of it https://github.com/cri-o/cri-o/pull/2247/files#diff-b67911656ef5d18c4ae36cb6741b7965L308)
The real pain with go1.12 and onwards would be modules also (and calculating $GOBIN). I'm not yet familiar with that. I'm super fine following up to this and add targets to install tools also 👍
There was a problem hiding this comment.
👍 I guess I'm used to having a golang version check to handle compatibility. there were issues with GOBIN? never come across that myself.
There was a problem hiding this comment.
I guess I'm used to having a golang version check to handle compatibility.
oh cool, that might be something useful to have here in MCO as well :)
there were issues with GOBIN? never come across that myself.
afaict with go modules, go build creates binaries in PWD so that must be conditionalized as well (hence your suggestion above to version check is amazing)
|
This is good to go now |
|
/hold cancel |
There was a problem hiding this comment.
we definitely want to exclude unit test files from linting? Just double checking.
There was a problem hiding this comment.
yep, but as with the other "ignored" linters in this file, we might want, at some point, remove this and fix everything. Right now we need to get this in and fix code (not tests) to have this run and check on every PR w/o asking ppl to gofmt as you noticed.
Fix all the current warnings as well Signed-off-by: Antonio Murdaca <runcom@linux.com>
|
rebased again 😄 |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kikisdeliveryservice, runcom The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Antonio Murdaca runcom@linux.com
- What I did
Add https://github.com/golangci/golangci-lint to our verify target and fix all the current warnings to start fresh once this PR merges. The linter binary is already
go get'ed with openshift/release#3332closes #447
- How to verify it
CI
- Description for the changelog