Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions csharp/ql/src/Bad Practices/PathCombine.ql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @name Call to System.IO.Path.Combine
* @description Finds calls to System.IO.Path's Combine method
* @name Call to 'System.IO.Path.Combine' may silently drop its earlier arguments
* @description 'Path.Combine' may silently drop its earlier arguments
* if its later arguments are absolute paths.
* @kind problem
* @problem.severity recommendation
* @precision very-high
Expand All @@ -15,4 +16,4 @@ import semmle.code.csharp.frameworks.System

from MethodCall call
where call.getTarget().hasFullyQualifiedName("System.IO", "Path", "Combine")
select call, "Call to 'System.IO.Path.Combine'."
select call, "Call to 'System.IO.Path.Combine' may silently drop its earlier arguments."
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: queryMetadata
---
* Updated the `name`, `description`, and alert message of PathCombine.ql to have more details about why it's a problem.