Skip to content

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Sep 20, 2025

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.

@rulasg rulasg merged commit 600d71e into main Sep 20, 2025
2 of 3 checks passed
@@ -0,0 +1,11 @@
function Test_Build-Tree{

Check warning

Code scanning / PSScriptAnalyzer

The cmdlet 'Test_Build-Tree' uses an unapproved verb. Warning

The cmdlet 'Test_Build-Tree' uses an unapproved verb.
@@ -0,0 +1,11 @@
function Test_Build-Tree{

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
@@ -0,0 +1,103 @@
function Build-Tree {

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Build-Tree' does not have a help comment. Note

The cmdlet 'Build-Tree' does not have a help comment.

$tree = Build-Node $hubbers $ceo

$global:hubbers = $hubbers

Check warning

Code scanning / PSScriptAnalyzer

Found global variable 'global:hubbers'. Warning

Found global variable 'global:hubbers'.
$tree = Build-Node $hubbers $ceo

$global:hubbers = $hubbers
$global:tree = $tree

Check warning

Code scanning / PSScriptAnalyzer

Found global variable 'global:tree'. Warning

Found global variable 'global:tree'.
$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

The cmdlet 'Build-Tree' returns an object of type 'System.Object[]' but this type is not declared in the OutputType attribute.

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

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.

$Node.employees.$elogin = Build-Node $hubbers $employee
}

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
function Test-Continue() {

$max = 5000

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
@rulasg rulasg deleted the build-tree branch September 20, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants