-
Notifications
You must be signed in to change notification settings - Fork 87
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
gofmt -s and some staticcheck work #506
Conversation
And enforce it via make.
FWIW I would definitely recommend following |
This one is probably a bit harder to merge as-is. Do really appreciate the contribution. Some notes:
There seem to be some real fixes in here w/r/t unhandled |
By commit:
|
Renaming imports up to you - it sounds like you're in the middle of rethinking import paths. Removing that part. Note that staticcheck and golangci-lint are pretty different tools :) The former is like an extension of vet, with high quality checks that aim for very low false positives. golangci-lint is a collection of linters with a big range of quality, speed, and purpose. I'd personally stick to gofmt+vet+staticcheck in general. |
All harmless: dropping unnecessary append loops and fmt.Sprintf calls, simplifying boolean checks, and removing redundant types.
cids in ImportSlice has been unused since 2023/09. GetFollows built an "out" slice but never returned it, which seems like a bug. TransformPost already collects image alt texts in another loop. A few places like testing.SetupBGS did not check error values. Leave one in bgs as a TODO, since it's not clear to me what kind of response should the server return.
@bnewbold any suggestion on next steps, before this gains merge conflicts? |
Already gained some conflicts :) friendly bump, happy to solve them |
A large amount of conflicts at this point. I'll leave it to you to figure out whether you want to obey these tools - I very much think you should. |
(see commit messages - please do not squash)