-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
introduce static analysis #265
Conversation
0207a1e
to
2027c84
Compare
Codecov Report
@@ Coverage Diff @@
## master #265 +/- ##
==========================================
- Coverage 63.68% 63.57% -0.12%
==========================================
Files 79 79
Lines 5640 5655 +15
==========================================
+ Hits 3592 3595 +3
- Misses 1689 1697 +8
- Partials 359 363 +4
Continue to review full report at Codecov.
|
Tip, you can manage a whole host of linters easily and efficiently using: https://github.com/golangci/golangci-lint |
2027c84
to
d073a30
Compare
Indeed, thanks, we have it included in the plgd-dev/hub repository. I've added there both stand-alone analysis and golangsci-lint, though I no longer recall why. (The latest released version and the version of the linter bundled in golangsci might be different? Can't remember, lets just say that I'm a linting maximalist.) |
message/pool/message.go
Outdated
@@ -75,6 +76,9 @@ func (r *Message) ResetOptionsTo(in message.Options) { | |||
r.valueBuffer = append(r.valueBuffer, make([]byte, used)...) | |||
opts, used, err = r.msg.Options.ResetOptionsTo(r.valueBuffer, in) | |||
} | |||
if err != nil { | |||
panic(fmt.Errorf("unexpected error: %w", 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.
@jkralik panicking in these setters feels wrong. But what else can we do without changing the API? If the first call r.msg.Options.ResetOptionsTo
gives us correct required size for the value buffer this should never occur. But any ideas how else might we enforce it?
7066d81
to
5d6c2b0
Compare
5d6c2b0
to
7920018
Compare
golang.org/x/net v0.0.0-20220107192237-5cfca573fb4d
8fca3b0
to
58e4951
Compare
0fce43f
to
ffcc200
Compare
SonarCloud Quality Gate failed. |
No description provided.