-
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement Build-Tree and Get-Hubber functions #2
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
Conversation
| @@ -0,0 +1,11 @@ | |||
| function Test_Build-Tree{ | |||
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'Test_Build-Tree' uses an unapproved verb. Warning
| @@ -0,0 +1,11 @@ | |||
| function Test_Build-Tree{ | |||
|
|
|||
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| @@ -0,0 +1,103 @@ | |||
| function Build-Tree { | |||
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Build-Tree' does not have a help comment. Note
|
|
||
| $tree = Build-Node $hubbers $ceo | ||
|
|
||
| $global:hubbers = $hubbers |
Check warning
Code scanning / PSScriptAnalyzer
Found global variable 'global:hubbers'. Warning
| $tree = Build-Node $hubbers $ceo | ||
|
|
||
| $global:hubbers = $hubbers | ||
| $global:tree = $tree |
Check warning
Code scanning / PSScriptAnalyzer
Found global variable 'global:tree'. Warning
| $global:hubbers = $hubbers | ||
| $global:tree = $tree | ||
|
|
||
| return $hubbers, $tree |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Build-Tree' returns an object of type 'System.Object[]' but this type is not declared in the OutputType attribute. Note
|
|
||
| try { | ||
|
|
||
| Write-Host "." -NoNewline |
Check warning
Code scanning / PSScriptAnalyzer
File 'buildTree.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
|
|
||
| $Node.employees.$elogin = Build-Node $hubbers $employee | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| function Test-Continue() { | ||
|
|
||
| $max = 5000 | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
Introduce the Build-Tree function to construct a hierarchical representation of employees and their managers. Enhance the Get-Hubber function to optionally return hubbers as a hashtable. Include tests to validate the functionality of the new features.