You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the error Invoke-ScriptAnalyzer : 'count' must be non-negative. when I have the setting PSAlignAssignmentStatement enabled for CheckHashTable and a hash is on the same line rather then a new line. If CheckHashTable is set to false there is no error.
Thanks for the detailed submission. I can confirm this happens also for Windows PowerShell 5.1 and I could catch the exception, the problem lies in the 2nd argument to the constructor of the string that results in a negative number (20-28=-8)
The underlying problem is this code line here that determines the extent with the widest equal sign only by looking at the length of tje key. This calculation goes wrong in this line here where ProductSlug is more to the right than DownloadPath.
I have a preliminary fix in my branch here and will issue a PR tomorrow (see below)
I get the error
Invoke-ScriptAnalyzer : 'count' must be non-negative.
when I have the setting PSAlignAssignmentStatement enabled for CheckHashTable and a hash is on the same line rather then a new line. If CheckHashTable is set to false there is no error.Steps to reproduce
I have created a sample project that can be used to reproduce the error at https://github.com/KyleMartin901/km-psscript
Expected behavior
Actual behavior
If an unexpected error was thrown then please report the full error details using e.g.
$error[0] | Select-Object *
Environment data
The text was updated successfully, but these errors were encountered: