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 S6354 FN: Rule does not raise an issue when DateTimeOffset is used #5434

Closed
csaba-sagi-sonarsource opened this issue Feb 25, 2022 · 0 comments · Fixed by #5435
Closed
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Type: False Negative Rule is NOT triggered when it should be.
Milestone

Comments

@csaba-sagi-sonarsource
Copy link
Contributor

Description

S6354 should also raise issues when DateTimeOffset.Now and DateTimeOffset.UtcNow are used.
Originally the issue was reported by community: https://community.sonarsource.com/t/rule-use-a-testable-date-time-provider-does-not-flag-datetimeoffset/58667

Repro steps

Use either DateTimeOffset.Now or DateTimeOffset.UtcNow and see that no issues are raised.

Expected behavior

An issue is rasied

Actual behavior

No issue is raised by rule S6354.

Known workarounds

None

Related information

  • C#/VB.NET Plugins version: 8.36.0.43782
@csaba-sagi-sonarsource csaba-sagi-sonarsource added Area: C# C# rules related issues. Type: False Negative Rule is NOT triggered when it should be. Area: VB.NET VB.NET rules related issues. labels Feb 25, 2022
@github-actions github-actions bot added this to False Negative in Backlog Feb 25, 2022
@github-actions github-actions bot added this to Review in progress in Best Kanban Mar 1, 2022
@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Mar 7, 2022
Backlog automation moved this from False Negative to Done Mar 7, 2022
Best Kanban automation moved this from Review approved to Validate Peach Mar 7, 2022
@csaba-sagi-sonarsource csaba-sagi-sonarsource moved this from Validate Peach to Done in Best Kanban Mar 11, 2022
@pavel-mikula-sonarsource pavel-mikula-sonarsource changed the title S6354 FN: Rule does not raise an issue when DateTimeOffset is used Fix S6354 FN: Rule does not raise an issue when DateTimeOffset is used Mar 30, 2022
@pavel-mikula-sonarsource pavel-mikula-sonarsource added this to the 8.37 milestone Mar 30, 2022
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. Type: False Negative Rule is NOT triggered when it should be.
Projects
Best Kanban
  
Done
Backlog
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants