-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add static analysis #35
base: main
Are you sure you want to change the base?
Conversation
broadcast_test.go
Outdated
b.Add(sinks[i]) | ||
b.Add(sinks[i]) // noop | ||
err := b.Add(sinks[i]) | ||
assert.NoError(t, err) |
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.
Wondering if we (haven't looked closely yet) can do without assertion library). The repo had only one dependency (logrus) which we probably may be able to get rid of; in that case it would have no dependencies at all, which is rather nice
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.
Should not be too bad without the library. All the assertions are NoError
on second review.
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.
Yes, if it's indeed only those (and no advanced assertions are needed), that'd be great.
It's slightly more cumbersome to write, but may be worth the effort for library modules like this. 🤗
queue_test.go
Outdated
"testing" | ||
"time" | ||
|
||
"golang.org/x/sync/errgroup" |
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.
Oh, right; if we must have to use this one, then I guess we'd not be able to have zero-dependencies.
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.
Maybe I can take a second try at this. Was only working to appease the linter. Might not be worth pulling in a dependency just for that.
f88a696
to
fd5f5f2
Compare
Ran CI in fork. See austinvazquez#2 |
ba68a5c
to
ea41a33
Compare
Signed-off-by: Austin Vazquez <[email protected]>
Signed-off-by: Austin Vazquez <[email protected]>
Signed-off-by: Austin Vazquez <[email protected]>
ea41a33
to
7748edc
Compare
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.
LGTM
@vvoland LGTY? |
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.
Left one comment, but overall LGTM
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "oldstable" |
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.
Perhaps use an explicit version here?
Issue
Partial #34
Description
This change refactors unit tests to resolve lint warnings and adds static analysis to CI.