-
Notifications
You must be signed in to change notification settings - Fork 18
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
[291] Enable lint errcheck #501
Conversation
Codecov ReportBase: 53.90% // Head: 54.36% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #501 +/- ##
==========================================
+ Coverage 53.90% 54.36% +0.45%
==========================================
Files 345 369 +24
Lines 42685 42708 +23
Branches 599 599
==========================================
+ Hits 23011 23218 +207
+ Misses 17239 17028 -211
- Partials 2435 2462 +27
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Congrats on your first PR! Whooo!
dynamics/db_test.go
Outdated
@@ -78,7 +81,7 @@ func TestGetSetNode(t *testing.T) { | |||
db := initializeDB() | |||
|
|||
node := &Node{} | |||
db.rawDB.Update(func(txn *badger.Txn) error { | |||
_ = db.rawDB.Update(func(txn *badger.Txn) error { |
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 check and t.Fatal
on this.
dynamics/db_test.go
Outdated
@@ -124,7 +127,7 @@ func TestGetSetLinkedList(t *testing.T) { | |||
db := initializeDB() | |||
|
|||
ll := &LinkedList{} | |||
db.rawDB.Update(func(txn *badger.Txn) error { | |||
_ = db.rawDB.Update(func(txn *badger.Txn) error { |
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 check and t.Fatal
on this.
layer1/executor/model.go
Outdated
@@ -135,7 +136,7 @@ type ManagerResponseInfo struct { | |||
type requestStored struct { | |||
BaseRequest | |||
WrappedTask *marshaller.InstanceWrapper `json:"wrappedTask"` | |||
killedAt uint64 `json:"killedAt"` | |||
killedAt uint64 `json:"-"` |
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 pull this out of the PR unless it's needed by another change.
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.
Will do.
layer1/executor/task_manager.go
Outdated
@@ -121,7 +122,10 @@ func (tm *TaskManager) eventLoop() { | |||
|
|||
case taskRequest, ok := <-tm.requestChan: | |||
if !ok { | |||
tm.onError(ErrReceivedRequestClosedChan) | |||
err := tm.onError(ErrReceivedRequestClosedChan) |
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.
tm.onError
always returns an error, no need to check if it's not nil. Probably can just _
this error.
11d3c50
to
483ab98
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!
Scope
Why?
Code maintenance and readability
Todos
Keep the issue open because more linting needs to be completed before closing.