Skip to content

Add ctxcause linter #4859

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

Closed
wants to merge 5 commits into from
Closed

Conversation

sivchari
Copy link
Member

@sivchari sivchari commented Jul 5, 2024

I added ctxcause linter to golangci-lint.
This linter reports the use of context.WithCancel, context.WithTimeout, and context.WithDeadline instead of context.WithCancelCause, context.WithTimeoutCause, and context.WithDeadlineCause.

sivchari added 5 commits July 5, 2024 18:14
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
@Antonboom
Copy link
Contributor

Antonboom commented Jul 5, 2024

Hi!

You can just use forbidigo or gofmt.rewrite-rules for such purposes

@ccoVeille

This comment was marked as off-topic.

@ldez ldez added declined linter: new Support new linter labels Jul 5, 2024
@ldez
Copy link
Member

ldez commented Jul 5, 2024

It can already be done with forbidigo, so we will not accept this linter.

@ldez ldez closed this Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined linter: new Support new linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants