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 S1075 FN: default parameters #8129

Closed
cristian-ambrosini-sonarsource opened this issue Oct 2, 2023 · 0 comments · Fixed by #8146
Closed

Fix S1075 FN: default parameters #8129

cristian-ambrosini-sonarsource opened this issue Oct 2, 2023 · 0 comments · Fixed by #8146
Assignees
Labels
Area: C#12 C#12 related issues Type: False Negative Rule is NOT triggered when it should be.
Projects
Milestone

Comments

@cristian-ambrosini-sonarsource
Copy link
Contributor

The rule does not take into account the primary constructor, lambda's and methods default parameters.

class PrimaryConstructor(string ctorParam = "file://blah.txt") // FN
{
    void Method(string methodParam = "file://blah.txt") // FN
    {
        var lambda = (string lambdaParam = "file://blah.txt") => lambdaParam; // FN
    }
}
@cristian-ambrosini-sonarsource cristian-ambrosini-sonarsource added Type: False Negative Rule is NOT triggered when it should be. Area: C#12 C#12 related issues labels Oct 2, 2023
@github-actions github-actions bot added this to Review in progress in Best Kanban Oct 4, 2023
@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Oct 10, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Oct 11, 2023
@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Oct 12, 2023
Best Kanban automation moved this from Review approved to Validate Peach Oct 12, 2023
@cristian-ambrosini-sonarsource cristian-ambrosini-sonarsource moved this from Validate Peach to Done in Best Kanban Oct 17, 2023
@andrei-epure-sonarsource andrei-epure-sonarsource added this to the 9.13 milestone Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C#12 C#12 related issues Type: False Negative Rule is NOT triggered when it should be.
Projects
Best Kanban
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants