-
Notifications
You must be signed in to change notification settings - Fork 113
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
Fix some of the Go Report Card findings #538
Fix some of the Go Report Card findings #538
Conversation
@HeavyWombat could we use this PR to actually make this validations as part of a new Makefile target, see #445 (comment) ? We might need multiple new make targets, e.g. one for using misspell and another one for using staticcheck |
Yes, good point. I was also wondering if we should add it either as Makefile targets or directly in Travis. Usually, I would prefer that as a |
@HeavyWombat yes. I think in this way we enforce people to fix this sanity checks in advance, and in theory we will not have the need of doing standalone prs. We can work on this together, let me know. |
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.
Looks good @HeavyWombat. May you update the developer's documentation to introduce the new sanity-check
target? Maybe in the Testing guide ?
Add Makefile targets for: - go vet - golint - ineffassign - misspell - staticcheck
Fix `golint` issues for missing comments of exported functions and constants.
Use suggested replacements for `misspell` findings.
Remove trailing whitespaces. Add missing whitespaces between words. Delete duplicate whitespaces.
Remove unused variables reported by `staticcheck`.
Simplify return code on build controller watch call by combining the `return` statement with the watch call. Add `if err != nil` check in build controller `add` function for the `Watch` that checks primary resource builds. Add log statement in e2e test code where the err was assigned, but not checked. Add `Expect` in e2e test code where err was assigned, but not used.
Based on feedback in #538, harmonise function signatures to better match.
Introduce section to explain the new Makefile targets.
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.
Nice work @HeavyWombat.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SaschaSchwarze0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I went on the Go Report Card of
shipwright-io/build
by chance and saw some minor warnings there. So I decided to quickly fix all warnings that were easy to fix.This includes: