Skip to content
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

Analyzer rule NSB0002 adds the CancellationToken to the wrong place for fluent API calls #6753

Closed
danielmarbach opened this issue Jun 5, 2023 · 1 comment
Labels
Milestone

Comments

@danielmarbach
Copy link
Contributor

danielmarbach commented Jun 5, 2023

Describe the bug

Originally raised by @SimonCropp

Description

For fluent style invocations, the cancellation token analyzer finds the right method that misses the cancellation token parameter

image

but does add the parameter to the first method invocation instead of the one that actually accepts the cancellation token

image

Versions

All supported versions that contain the analyzer

Additional Information

Workarounds

Manually fixing the analyzer code

Possible solutions

Additional information

@danielmarbach danielmarbach changed the title NSB0002: CancellationToken analyzer does not handle fluent invocations properly NSB0002: CancellationToken analyzer adds the cancellation token into the wrong place for fluent API calls Jun 5, 2023
@andreasohlund andreasohlund added this to the 8.1.0 milestone Jun 5, 2023
@DavidBoike
Copy link
Member

@danielmarbach fixed in #6751 - will be released as part of NServiceBus 8.1.0.

@DavidBoike DavidBoike changed the title NSB0002: CancellationToken analyzer adds the cancellation token into the wrong place for fluent API calls Analyzer rule NSB0002 adds the CancellationToken to the wrong place for fluent API calls Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants