-
Notifications
You must be signed in to change notification settings - Fork 394
Scan multiple times a module throw System.InvalidOperationException #900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Repeated analysis on a manifesto seems to be the cause : 1..20|% { $res=Invoke-ScriptAnalyzer -path 'C:\Program Files\WindowsPowerShell\Modules\PSScriptAnalyzer\1.16.1\PSScriptAnalyzer.psm1'}
#no errror
1..20|% { $res=Invoke-ScriptAnalyzer -path 'C:\Program Files\WindowsPowerShell\Modules\PSScriptAnalyzer\1.16.1\PSScriptAnalyzer.psd1'}
# error The error message may be different :
|
No error when I exclude the following rules : PSUseToExportFieldsInManifest,PSMissingModuleManifestField 1..30|% { $res=Invoke-ScriptAnalyzer -path 'C:\Program Files\Windows
PowerShell\Modules\PSScriptAnalyzer\1.16.1\PSScriptAnalyzer.psd1' -ExcludeRule PSUseToExportFieldsInManifest,PSMissingModuleManifestField} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Run a scan multiple times on a module :
Expected behavior
No error.
Actual behavior
throw System.InvalidOperationException:
Collection was modified; enumeration operation may not execute.
Environment data
Log:
The text was updated successfully, but these errors were encountered: