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: Support collections and collection expressions #8172

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

Fix S1075 FN: Support collections and collection expressions #8172

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

Comments

@cristian-ambrosini-sonarsource
Copy link
Contributor

cristian-ambrosini-sonarsource commented Oct 10, 2023

The rule should raise an issue when URIs or path delimiters are hardcoded as an element of a collection.

IList<string> uriList1 = new[] { "C:/test.txt" }; // FN
IList<string> uriList2 = ["C:/test.txt"]; // FN
string[][] uriMatrix1 = [["C:/test.txt"]]; // FN
IDictionary<string, string> uriDict = new Dictionary<string, string> { ["a"] = "C:/test.txt" }; // FN
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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants