analyze: add -ExcludeLibrary switch to skip library modules
- Commit
87fa81aa995c1a9164212bfc298a2780e9f7d6cc- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-15 18:27 UTC (3 months ago)
- Parents
c9747bd
Diff
analyze.ps1
diff --git a/analyze.ps1 b/analyze.ps1index 692fedb57e..335acb7579 100644--- a/analyze.ps1+++ b/analyze.ps1@@ -5,7 +5,11 @@ param ( [Parameter(Mandatory = $false)] [Alias("m")]- [string]$ModuleName+ [string]$ModuleName,++ [Parameter(Mandatory = $false)]+ [Alias("nolib")]+ [switch]$ExcludeLibrary ) # Handle RAM analysis on a connected Android device@@ -84,6 +88,11 @@ if ($Type -eq "ram") { # Core logic to fetch and filter files for codebase analysis $files = gci -r -fi *.kt | ? {$_.FullName -match '\\src\\'} +# Optionally exclude shared library modules (anything under a top-level "library" dir)+if ($ExcludeLibrary) {+ $files = $files | ? { $_.FullName -notmatch '\\library\\' }+}+ # If a specific module is requested, filter the files down early if ($ModuleName) { $files = $files | ? { ($_.FullName -split '\\src\\')[0].Split('\')[-1] -eq $ModuleName }