Skip to content

Commit 44e4e3e

Browse files
committed
PS: Extract more powershell files and fix off-by-one error in locations.
1 parent 4c13821 commit 44e4e3e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

powershell/codeql-extractor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ file_types:
1010
display_name: powershellscripts
1111
extensions:
1212
- .ps1
13-
- .psd1
13+
- .psd1
14+
- .psm1

powershell/extractor/Semmle.Extraction.PowerShell.Standalone/Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public override void InvalidArgument(string argument)
7474
/// <summary>
7575
/// List of extensions to include.
7676
/// </summary>
77-
public IList<string> Extensions { get; } = new List<string>() { ".ps1" };
77+
public IList<string> Extensions { get; } = new List<string>() { ".ps1", ".psd1", ".psm1" };
7878

7979
/// <summary>
8080
/// Files/patterns to exclude.

powershell/extractor/Semmle.Extraction/Tuples.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal static void folders(this System.IO.TextWriter trapFile, Folder folder,
3030

3131
public static void locations_default(this System.IO.TextWriter trapFile, SourceLocation label, Entities.File file, int startLine, int startCol, int endLine, int endCol)
3232
{
33-
trapFile.WriteTuple("locations_default", label, file, startLine, startCol, endLine, endCol);
33+
trapFile.WriteTuple("locations_default", label, file, startLine, startCol, endLine, endCol - 1);
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)