-
Notifications
You must be signed in to change notification settings - Fork 91
Go 1.16 support and some general improvements #350
Conversation
golint has been deprecated and archived. There's no 1:1 match for it, but staticcheck is a checker the golint README recommends and has tons of useful checks. This commit enables all checks, and then disables: * ST1000: Incorrect or missing package comment * ST1005: Incorrectly formatted error string, necessary due to the fact that all our error strings are capitalised, which they should not be * SA1019: Locally in goneb.go because we have to rework how we use the prometheus package there It also fixes a number of other errors surfaced by staticheck.
v2 was a set of erroneous tags, the latest is v1.14.7 which also fixes a vet warning related to building sqlite3 on gcc10+.
Though all the tests pass, one test is logging a panic:
I don't really know why, it seems the handler that gets installed for |
@kegsay @neilalexander Could I bother you for a review on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to use golangci-lint
, which includes staticcheck
. There's a sample config in the Dendrite repository, if we're looking to settle on a standard.
I was thinking about that, but due to the amount of extra linters that it has and the state of go-neb that becomes a lot of extra things to fix. I'm happy to do that, but I'd prefer to do it as a follow-up PR. |
I realized you also incorporate my changes: https://github.com/matrix-org/go-neb/pull/351/files |
@neilalexander @kegsay Could I get another review and/or sign-off please? I'd like to move this forward. |
@kegsay Do you have any thoughts on this? I'm still kinda puzzled by the test. It feels wrong that it's logging a panic there. |
Let's leave it for now, but if you can file an issue for it that'd be great. |
Forgot to do this as part of #350, which flipped CI to GitHub Actions.
Just for general house keeping purposes and getting access to new features in go
Golint has been deprecated and frozen
The v2 tags were erroneous, move us back to v1 tags
We've started to use GHA for more things on matrix-org, this moves neb in the same direction. The one thing we lose now is the Travis-CI webhook notifications, but given GHA will poke the author of the PR if their builds fail that feels like an acceptable trade-off. You can see what a build ends up looking like over here
We need this in order to be able to build with newer versions of Go