C#: Fix the `cs/path-combine` code quality issues in the extractor. by michaelnebel · Pull Request #21996 · github/codeql
michaelnebel
changed the title
C#: Fix the cs/path-combine code quality issues in the extractor.
C#: Fix the cs/path-combine code quality issues in the extractor.
Copilot AI review requested due to automatic review settings
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot's findings
- Files reviewed: 24/24 changed files
- Comments generated: 1
| } | ||
|
|
||
| return Path.GetFullPath(Path.Combine(projDir?.FullName ?? string.Empty, Path.DirectorySeparatorChar == '/' ? file.Replace("\\", "/") : file)); | ||
| return Path.GetFullPath(Path.Join(projDir?.FullName ?? string.Empty, Path.DirectorySeparatorChar == '/' ? file.Replace("\\", "/") : file)); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into what can happen in this particular case.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good point as the .csproj files can contain both relative and absolute paths.