Repository navigation
fix: resolve all 17 PSScriptAnalyzer code scanning findings - #343
Merged
Merged
Conversation
- New-IdleEntraIDAdapter.ps1: fix aligned-assignment whitespace and replace empty catch blocks with explicit null assignments to satisfy PSAvoidUsingEmptyCatchBlock without changing behaviour - New-IdleEntraIDIdentityProvider.ps1: remove alignment spacing before = in groupOperations/administrativeUnitResults declarations; refactor multi-line -or expression to single-line via $kindIsEmpty helper to fix PSUseConsistentIndentation on continuation lines - New-IdleEntraConnectDirectorySyncProvider.ps1: extract inline script blocks passed as arguments to InvokeRemoteCommand into named variables so that PSScriptAnalyzer can consistently verify their indentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwCt3MWjHysJWoaP4Nrzrk
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Verdict: PASS Behaviour-preserving lint fixes (whitespace, explicit Findings: none. |
Code Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves all 17 open GitHub Code Scanning alerts raised by PSScriptAnalyzer across three provider files.
Motivation
The CI lint step flags these findings as warnings. With
FailOnSeverity=Warningthey would break the build, and the GitHub Code Scanning dashboard shows 17 open alerts. Fixing them keeps the codebase clean and the alert list empty.Type of Change
Changes
New-IdleEntraIDAdapter.ps1: remove aligned whitespace before=; replace emptycatch { }blocks withcatch { $var = $null }(same runtime behaviour, satisfiesPSAvoidUsingEmptyCatchBlock)New-IdleEntraIDIdentityProvider.ps1: remove alignment spacing in$groupOperations/$administrativeUnitResultsdeclarations (two occurrences); refactor multi-line-orexpression into a single line via$kindIsEmptyhelper to eliminate continuation-line indentation findingsNew-IdleEntraConnectDirectorySyncProvider.ps1: extract inline script blocks passed as arguments toInvokeRemoteCommandinto named variables ($syncScript,$schedulerScript) so PSScriptAnalyzer can verify their indentation consistentlyTesting
Invoke-IdlePesterTests.ps1: 904 passed, 0 failedHow to test & review
Run locally:
Both should report zero findings / zero failures.
Checklist
Related Issues
No related issue — these are pure linting fixes surfaced by GitHub Code Scanning.
Generated by Claude Code