From 0b18541d43de51e8f424ef5de51f11180fad7b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20El-Saig?= Date: Mon, 11 Sep 2023 22:30:02 +0200 Subject: [PATCH] Replace notlike with NotLike --- Lombiq.Analyzers.PowerShell/Invoke-Analyzer.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.Analyzers.PowerShell/Invoke-Analyzer.ps1 b/Lombiq.Analyzers.PowerShell/Invoke-Analyzer.ps1 index 0694d0a..8474623 100644 --- a/Lombiq.Analyzers.PowerShell/Invoke-Analyzer.ps1 +++ b/Lombiq.Analyzers.PowerShell/Invoke-Analyzer.ps1 @@ -18,10 +18,10 @@ param( [switch] $Fix ) -# This is like Get-ChildItem -Recurse -Include $IncludeFile | ? { $PSItem.FullName -notlike "*\$ExcludeDirectory\*" } +# This is like Get-ChildItem -Recurse -Include $IncludeFile | ? { $PSItem.FullName -NotLike "*\$ExcludeDirectory\*" } # but much faster. For example, this is relevant for ignoring node_modules. # - Measure-Command { Find-Recursively -Path . -IncludeFile *.ps1 -ExcludeDirectory node_modules } => 3.83s -# - Measure-Command { Get-ChildItem -Recurse -Force -Include $IncludeFile | ? { $PSItem.FullName -notlike +# - Measure-Command { Get-ChildItem -Recurse -Force -Include $IncludeFile | ? { $PSItem.FullName -NotLike # "*\$ExcludeDirectory\*" } } => 111.27s function Find-Recursively([string] $Path = '.', [string[]] $IncludeFile, [string] $ExcludeDirectory) {