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

Fix S2094 FP: Should not raise for messages #9063

Closed
denis-troller opened this issue Apr 10, 2024 · 3 comments · Fixed by #9072
Closed

Fix S2094 FP: Should not raise for messages #9063

denis-troller opened this issue Apr 10, 2024 · 3 comments · Fixed by #9072
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Positive Rule IS triggered when it shouldn't be.
Projects
Milestone

Comments

@denis-troller
Copy link

Description

It is not an uncommon pattern to have messages (commands, events) with absolutely no members in it when using messaging of any kind (Fluxor, MassTransit, Wolverine...) and especially in distributed environment.
In such cases, rule S2094 raises.

Repro steps

Consider the following classes, which are totally valid messages and events.

public class PlayCommand {}

public class StreamingServiceStartedEvent {}

Expected behavior

I would expect rule S2094 not to raise on such classes.

I would suggest ignoring classes that have known suffixes such as

  • Command
  • Event
  • Message
@denis-troller denis-troller added Type: False Positive Rule IS triggered when it shouldn't be. Area: C# C# rules related issues. labels Apr 10, 2024
@denis-troller denis-troller added this to To do in Best Kanban Apr 10, 2024
@denis-troller denis-troller added the Sprint: Hardening Fix FPs/FNs/improvements label Apr 10, 2024
@Tim-Pohlmann Tim-Pohlmann added the Area: VB.NET VB.NET rules related issues. label Apr 11, 2024
@Tim-Pohlmann Tim-Pohlmann self-assigned this Apr 11, 2024
@Tim-Pohlmann Tim-Pohlmann moved this from To do to In progress in Best Kanban Apr 11, 2024
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Apr 11, 2024
@Tim-Pohlmann
Copy link
Contributor

RSPEC PR

@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Apr 12, 2024
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Apr 12, 2024
@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Apr 12, 2024
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Apr 12, 2024
@Tim-Pohlmann Tim-Pohlmann added this to the 9.24 milestone Apr 12, 2024
Best Kanban automation moved this from Review in progress to Validate Peach Apr 12, 2024
@Tim-Pohlmann Tim-Pohlmann moved this from Validate Peach to Done in Best Kanban Apr 16, 2024
@fraserkyle
Copy link

Can you add Query suffix to this in order to cover CQRS design pattern please.

@CristianAmbrosini
Copy link
Contributor

Hi @fraserkyle! Can I ask you to open a new issue with your request? My colleagues will take care of it as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Positive Rule IS triggered when it shouldn't be.
Projects
Best Kanban
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants