Skip to content

Implement Build-Tree and Get-Hubber functions - #2

Merged
rulasg merged 1 commit into
mainfrom
build-tree
Sep 20, 2025
Merged

Implement Build-Tree and Get-Hubber functions#2
rulasg merged 1 commit into
mainfrom
build-tree

Conversation

@rulasg

@rulasg rulasg commented Sep 20, 2025

Copy link
Copy Markdown
Owner

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
Comment thread public/buildTree.ps1
@@ -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.
Comment thread public/buildTree.ps1

$tree = Build-Node $hubbers $ceo

$global:hubbers = $hubbers

Check warning

Code scanning / PSScriptAnalyzer

Found global variable 'global:hubbers'. Warning

Found global variable 'global:hubbers'.
Comment thread public/buildTree.ps1
$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'.
Comment thread public/buildTree.ps1
$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.
Comment thread public/buildTree.ps1

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.
Comment thread public/buildTree.ps1

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

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
Comment thread public/buildTree.ps1
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