Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
Add errgroupcheck linter#4891
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Hey, thank you for opening your first Pull Request ! |
CLAassistant commentedAug 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
ldez commentedAug 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements.
Pull Request Description
Linter
The Linter Tests Inside Golangci-lint
|
Another yet case foruncalled |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Can you help me understand this?
The only config available is to enable / disable the sole rule currently implemented. Should I change the Default to be errgroupcheck:# Check if any sync.errgroup.Group instance is missing a call to the Wait() func.# Default: truerequire-wait:true |
The "# Default:" should be the default value. # Default: truerequire-wait:false |
Does the longer work for errgroups stored as struct attribute? |
errgroupcheck analyzes code and reports any usage of
golang.org/x/sync/errgroupthat is missing any call to theWait()func.All the examples reported in theerrgroup documentation showcase the correct usage of the
Wait()func to wait for all the coroutines to complete before proceeding.Missing the
Wait()call allows the code to compile just fine, but yields unexpected results due to the coroutines running without any wait for termination.