-
Notifications
You must be signed in to change notification settings - Fork 355
Enable all linters and resolve all outstanding lint issues (Resolves issue 2386) #2455
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
base: main
Are you sure you want to change the base?
Conversation
…Regex, use regexp.MustCompile
…st function (testifylint) - replace with manual error checking
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
… it does not degrade test quality
…st function (testifylint) - Move require.Error outside of goroutine
…nged to InEpsilon for approx comparison, resulting in more stable test results
…h `validationString += "[...]"` (gocritic)
tstirrat15
left a comment
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.
This looks good to me!
|
@tstirrat15 Anything else I need to get this merged before it gets stale? Unable to merge it myself - not sure if @vroldanbet has to review or if he was auto-included. |
vroldanbet
left a comment
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.
Thanks for your contribution! ✨ I understand it can get stale easily, but please be patient while we review this low-priority PR; it's a bit lengthy.
internal/datastore/crdb/migrations/zz_migration.0008_add_transaction_metadata_table.go
Outdated
Show resolved
Hide resolved
internal/datastore/crdb/migrations/zz_migration.0009_add_expiration_support.go
Outdated
Show resolved
Hide resolved
|
@James9074 just wanted to update - this is still something we're interested in and we haven't had the bandwidth to look at it yet. Apologies for the delay. |
|
@James9074 we're finally done with the push and should have some more bandwidth now. do you have the time and energy to get this rebased and ready? If not, we can take over the PR and make sure that you're attributed. |
Awesome! No worries, I'll rebase this week and resubmit for review. |
vroldanbet
left a comment
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.
Thanks with your patience with this one, we appreciate it ✨
I finished reviewing all the files. There are a handful of things I'd like to clarify before we move forward.
Please address the conflicts and I'll review again.
| var nsNotFoundErr datastore.NamespaceNotFoundError | ||
| if err == nil || !errors.As(err, &nsNotFoundErr) { | ||
| t.Errorf("expected NamespaceNotFoundError, got: %v", err) | ||
| } | ||
| if wcache.namespaceCache.inFallbackMode { | ||
| t.Errorf("expected inFallbackMode to be false") | ||
| } |
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.
What happened here? require ultimately causes t to fail. And why does not abide by the same recommendations described here?
same for all other instances in this file
|
|
||
| if index > len(expected)-1 { | ||
| tc.Require.Fail("expected %s, but found no additional results", expectedStr) | ||
| tc.Require.Fail("expected more results, but found no additional results", expectedStr) |
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.
Could you tell me what you're trying to fix here? How is expected more results, but found no additional results a better error message?
| leftOps := collapseOps(leftOperation, lookup) | ||
| rightOps := collapseOps(rightOperation, lookup) | ||
| ops := append(leftOps, rightOps...) | ||
| ops := append(collapseOps(leftOperation, lookup), collapseOps(rightOperation, lookup)...) |
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.
Could you tell me the reason for this change?
|
@tstirrat15 Feel free to take this one over or close it out, unfortunately I'm short on time this quarter and don't think I'll be able to wrap this up before it's too stale. |
|
Sounds good. Thank you so much for the work you put into it! |
|
Thank you @James9074! Your hard work doesn't go unnoticed. We'll take this over the finish line :) |
As per #2386, this PR uncomments
gocritic,govet, andtestifylint, and resolves all outstanding lint findings. Note thatgovetdid not actually return anything, butgocriticandtestifylintdid. Those were resolved, along with a number of stubborn yaml comment spacing complaints within the github workflows yamls.I generally resolved each finding in its own commit, for clarity. Additionally, I ran the full suite of unit tests after each fix and ensured no bloat in test execution time. The test suite took ~2.5 minutes before and after all changes on my machine.
Before:
See this for the raw output of all findings as of main/HEAD
After: