vCheck-vSphere icon indicating copy to clipboard operation
vCheck-vSphere copied to clipboard

Fix errors with -Config when plugin has no question prompts or indentation

Open Hossy opened this issue 1 year ago • 2 comments

Summary by Sourcery

This pull request addresses errors in the vCheck.ps1 script related to handling plugins without question prompts and proper indentation. It also includes enhancements to the settings processing logic and updates to documentation comments in specific plugin scripts.

  • Bug Fixes:
    • Fixed error handling in the Get-ID-String function to correctly parse ID names.
    • Resolved issues in the Invoke-Settings function to handle plugins without question prompts and correct indentation.
  • Enhancements:
    • Improved the logic in the Invoke-Settings function to handle settings without question prompts and maintain proper formatting.
  • Documentation:
    • Added comments in Plugins/60 VM/49 EVC Mismatch.ps1 and Plugins/60 VM/79 Find VMs in Uncontrolled Snapshot Mode.ps1 to clarify the purpose of settings.

Hossy avatar Jul 29 '24 14:07 Hossy

Reviewer's Guide by Sourcery

This pull request addresses errors related to configuration handling when plugins have no question prompts or indentation issues. The main changes include fixing pattern matching in the Get-ID-String function, initializing variables properly, handling cases with no question prompts, and ensuring correct parsing and appending of settings. Additionally, comments were added to plugin files to clarify the purpose of specific settings.

File-Level Changes

Files Changes
Plugins/60 VM/49 EVC Mismatch.ps1
Plugins/60 VM/79 Find VMs in Uncontrolled Snapshot Mode.ps1
Added comments to explain the purpose of settings in the plugin files.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

sourcery-ai[bot] avatar Jul 29 '24 14:07 sourcery-ai[bot]

Example for indentation is 04 Map disk region event.ps1 where settings are indented inside an if block. Invoke-Settings will now respect and maintain that indentation.

Hossy avatar Jul 29 '24 14:07 Hossy