sudo icon indicating copy to clipboard operation
sudo copied to clipboard

Improved the script

Open HotCakeX opened this issue 1 year ago • 1 comments

  • Changed the function name to PowerShell valid function name syntax.
  • Added proper error types to the throw statements. It's best practice and also allows for catching specific errors later on when needed.
  • Changed some variable types to full types instead of using type accelerators for better clarity.
  • Removed all the unnecessary trailing whitespaces.
    • Used \s+$ in VS Code's search as regex.
  • Changed double quotes to single quotes wherever possible for improved security, speed and to prevent string interpolation.

HotCakeX avatar May 23 '24 17:05 HotCakeX

@microsoft-github-policy-service agree

HotCakeX avatar May 23 '24 17:05 HotCakeX