Skip to content

Reduce ScriptAnalyzer warnings#83

Merged
blindzero merged 11 commits intomainfrom
issues/78-Reduce-ScriptAnalyzer-Warnings
Jan 17, 2026
Merged

Reduce ScriptAnalyzer warnings#83
blindzero merged 11 commits intomainfrom
issues/78-Reduce-ScriptAnalyzer-Warnings

Conversation

@blindzero
Copy link
Copy Markdown
Owner

Summary

Reduce ScriptAnalyzer warnings and tighten diagnostics.

Motivation

Reduce PSSA noise while keeping behavior deterministic and diagnosable (Closes #78).

Type of Change

Please select the relevant option:

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring / internal improvement

Changes

  • add targeted PSSA suppressions for false positives
  • add verbose logging for intentional fallback/ignored errors
  • normalize indentation to satisfy PSSA rules
  • add actor enrichment assertion in auth session test

Testing

Describe how this change was tested.

  • Unit tests
  • Contract tests
  • Manual testing

How to test & review

  • Invoke-Pester -Path ./tests
  • ./tools/Invoke-IdleScriptAnalyzer.ps1 -CI

Checklist

  • Code follows STYLEGUIDE.md
  • Tests added or updated
  • Documentation updated
  • No UI/auth logic added to IdLE.Core
  • No breaking changes without discussion

Related Issues

Closes #78

Copilot AI review requested due to automatic review settings January 17, 2026 00:46
@blindzero blindzero self-assigned this Jan 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request reduces PowerShell Script Analyzer (PSSA) warnings through code formatting improvements, targeted warning suppressions, and enhanced diagnostic logging.

Changes:

  • Normalized indentation and spacing to comply with PSSA style rules
  • Added PSSA suppressions for false positives (unused parameters used in closures/nested functions)
  • Enhanced diagnostic verbosity by adding Write-Verbose calls for intentional error handling

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/Set-IdleModuleVersion.ps1 Collapsed multi-line if-else to single line
tools/Generate-IdleStepReference.ps1 Normalized indentation and updated string formatting for markdown metadata fields
tools/Generate-IdleCmdletReference.ps1 Collapsed assignment and added verbose logging for missing help
src/IdLE/IdLE.psm1 Added verbose logging for module import fallback paths
src/IdLE.Core/Public/New-IdlePlanObject.ps1 Added space after comma in MemberType parameter
src/IdLE.Core/Public/Invoke-IdlePlanObject.ps1 Reformatted EventSink.WriteEvent calls to multi-line style
src/IdLE.Core/Private/Write-IdleEvent.ps1 Aligned variable assignment indentation
src/IdLE.Core/Private/Test-IdleCondition.ps1 Added PSSA suppression for Context parameter used in nested functions
src/IdLE.Core/Private/New-IdleEventSink.ps1 Added PSSA suppression for EventBuffer parameter used in closure
src/IdLE.Core/Private/Invoke-IdleWithRetry.ps1 Enhanced error handling comment and added verbose logging
src/IdLE.Core/Private/Copy-IdleRedactedObject.ps1 Added PSSA suppression for RedactionMarker parameter used in nested functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/Generate-IdleStepReference.ps1 Outdated
blindzero and others added 2 commits January 17, 2026 01:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 17, 2026 00:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/reference/steps.md
Comment thread docs/reference/steps.md Outdated
Comment thread docs/reference/steps.md
Copilot AI review requested due to automatic review settings January 17, 2026 01:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@blindzero blindzero merged commit a0b148b into main Jan 17, 2026
11 checks passed
@blindzero blindzero deleted the issues/78-Reduce-ScriptAnalyzer-Warnings branch January 18, 2026 11:01
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.

Reduce ScriptAnalyzer Warnings

2 participants