-
Notifications
You must be signed in to change notification settings - Fork 0
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
Potential fix for code scanning alert no. 13: Local scope variable shadows member #345
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…adows member Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Phileco <132178579+krishnprakash@users.noreply.github.com>
There are no files selected for viewing
Unchanged files with check annotations Beta
var index = 0; | ||
foreach (var element in TupleElements.Where(e => e is not null)) | ||
{ | ||
trapFile.tuple_element(this, index++, element); | ||
Check warning on line 50 in csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/TupleType.cs
|
||
} | ||
// Note: symbol.Locations seems to be very inconsistent |
Check notice
Code scanning / CodeQL
Local scope variable shadows member
Copilot Autofix AI 18 days ago
To fix the problem, we need to rename the local variable
loc
in theEmit
method to avoid shadowing the member variableloc
. This will make the code clearer and prevent any potential confusion or bugs related to variable shadowing.loc
in theEmit
method tolocation
.csharp/extractor/Semmle.Extraction.CSharp/Entities/TypeMention.cs
on line 121.