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

Improve S3247: Rule should catch more duplicated cast #223

Closed
2 tasks done
Evangelink opened this issue Apr 19, 2017 · 0 comments · Fixed by #9481
Closed
2 tasks done

Improve S3247: Rule should catch more duplicated cast #223

Evangelink opened this issue Apr 19, 2017 · 0 comments · Fixed by #9481
Assignees
Labels
Area: C# C# rules related issues. Area: CFG/SE CFG and SE related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Negative Rule is NOT triggered when it should be.
Milestone

Comments

@Evangelink
Copy link
Contributor

Evangelink commented Apr 19, 2017

See CA1800, Fxcop rule is able to detect when multiple cast are done on the same variable.

New cases to handle:

  • "is" cast then "as" cast
  • "is" cast with structs: if (obj is AStruct) // FN

When implementing this rule also consider #2120

@Evangelink Evangelink added Area: Rules Type: False Negative Rule is NOT triggered when it should be. labels Apr 19, 2017
@Evangelink Evangelink added this to the CFG + Symbolic Execution milestone Aug 9, 2018
@pavel-mikula-sonarsource pavel-mikula-sonarsource added Area: C# C# rules related issues. and removed Area: Rules labels Nov 29, 2019
@costin-zaharia-sonarsource costin-zaharia-sonarsource added the Area: CFG/SE CFG and SE related issues. label Dec 2, 2019
@costin-zaharia-sonarsource costin-zaharia-sonarsource removed this from the CFG + Symbolic Execution milestone Dec 2, 2019
antonioaversa added a commit that referenced this issue Oct 26, 2023
antonioaversa added a commit that referenced this issue Oct 26, 2023
@pavel-mikula-sonarsource pavel-mikula-sonarsource added this to the 9.29 milestone Jun 26, 2024
@pavel-mikula-sonarsource pavel-mikula-sonarsource added the Sprint: Hardening Fix FPs/FNs/improvements label Jun 27, 2024
@pavel-mikula-sonarsource pavel-mikula-sonarsource linked a pull request Jun 27, 2024 that will close this issue
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: CFG/SE CFG and SE related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Negative Rule is NOT triggered when it should be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants