[PR #15407] Improve Run-Tests.ps1's maintainability and readability #30629

Open
opened 2026-01-31 09:41:56 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15407

State: closed
Merged: Yes


Improvements and explanations:

  • Added proper indentation and spacing for better readability.
  • Added comments to explain the purpose of different sections of the
    code.
  • Utilized the $LASTEXITCODE variable instead of $lastexitcode to ensure
    consistency.
  • Changed the variable name from $testdlls to $testDlls for better
    naming convention.
  • Moved the Exit 0 statement to the end (outside the if condition).
  • Since Exit statements terminate the script immediately, it's better to
    have them at the end of the script to ensure that all necessary
    cleanup or additional operations are performed before exiting.
  • These improvements enhance the code's readability, maintainability,
    and adherence to best practices.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15407 **State:** closed **Merged:** Yes --- Improvements and explanations: * Added proper indentation and spacing for better readability. * Added comments to explain the purpose of different sections of the code. * Utilized the $LASTEXITCODE variable instead of $lastexitcode to ensure consistency. * Changed the variable name from $testdlls to $testDlls for better naming convention. * Moved the Exit 0 statement to the end (outside the if condition). * Since Exit statements terminate the script immediately, it's better to have them at the end of the script to ensure that all necessary cleanup or additional operations are performed before exiting. * These improvements enhance the code's readability, maintainability, and adherence to best practices.
claunia added the pull-request label 2026-01-31 09:41:56 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30629