Skip to content

Commit 07a5c20

Browse files
committed
Fix/add doc comments
1 parent a0dc20c commit 07a5c20

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,15 +771,16 @@ public void Dispose()
771771
}
772772

773773
/// <summary>
774-
/// Computes a unique temp directory for the packages associated
775-
/// with this source tree. Use a SHA1 of the directory name.
774+
/// Returns the full path to a temporary directory with the given subfolder name.
776775
/// </summary>
777-
/// <returns>The full path of the temp directory.</returns>
778776
private static string ComputeTempDirectoryPath(string subfolderName)
779777
{
780778
return Path.Combine(FileUtils.GetTemporaryWorkingDirectory(out _), subfolderName);
781779
}
782780

781+
/// <summary>
782+
/// Computes a unique temporary directory path based on the source directory and the subfolder name.
783+
/// </summary>
783784
private static string ComputeTempDirectoryPath(string srcDir, string subfolderName)
784785
{
785786
return Path.Combine(FileUtils.GetTemporaryWorkingDirectory(out _), FileUtils.ComputeHash(srcDir), subfolderName);

csharp/extractor/Semmle.Util/FileUtils.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static void TryDelete(string file)
8686
}
8787

8888
/// <summary>
89-
/// Computes the hash of <paramref name="filePath"/>.
89+
/// Computes the hash of the file at <paramref name="filePath"/>.
9090
/// </summary>
9191
public static string ComputeFileHash(string filePath)
9292
{
@@ -95,6 +95,9 @@ public static string ComputeFileHash(string filePath)
9595
return GetHashString(sha);
9696
}
9797

98+
/// <summary>
99+
/// Computes the hash of <paramref name="input"/>.
100+
/// </summary>
98101
public static string ComputeHash(string input)
99102
{
100103
var bytes = Encoding.Unicode.GetBytes(input);

0 commit comments

Comments
 (0)