WIP: psscriptanalyzer

This commit is contained in:
AJ ONeal
2023-11-07 09:42:58 -07:00
parent b61a678371
commit 6626a0df86
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
---
title: PSScriptAnalyzer
homepage: https://github.com/PowerShell/PSScriptAnalyzer
tagline: |
PSScriptAnalyzer is Formatter & Linter for PowerShell.
---
To update or switch versions, run `webi psscriptanalyzer`.
## Cheat Sheet
### Files
These are the files / directories that are created and/or modified with this
install:
```text
~/.local/share/powershell/Modules/
```
## Check the Installed Version
```pwsh
Get-Module -ListAvailable
```

View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -e
set -x
__install_psscriptanalyzer() {
echo "Checking for pwsh (PowerShell Core)..."
if ! command -v pwsh > /dev/null; then
"$HOME/.local/bin/webi" pwsh
export PATH="$HOME/.local/opt/pwsh:$PATH"
fi
pwsh -Command "Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -AllowClobber"
}
__install_psscriptanalyzer