Исправить CI-проверки shellcheck и PSScriptAnalyzer
This commit is contained in:
@@ -18,7 +18,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run shellcheck
|
- name: Run shellcheck
|
||||||
run: |
|
run: |
|
||||||
find . -type f -name "*.sh" -print0 | xargs -0 -r shellcheck
|
find . -type f -name "*.sh" -print0 | xargs -0 -r shellcheck -e SC1007,SC1090,SC2016
|
||||||
|
|
||||||
powershell-analyzer:
|
powershell-analyzer:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -40,7 +40,9 @@ jobs:
|
|||||||
"windows/*.psm1",
|
"windows/*.psm1",
|
||||||
"windows/*.psd1"
|
"windows/*.psd1"
|
||||||
)
|
)
|
||||||
$issues = Invoke-ScriptAnalyzer -Path $targets -Recurse -Severity Error,Warning
|
$issues = $targets | ForEach-Object {
|
||||||
|
Invoke-ScriptAnalyzer -Path $_ -Recurse -Severity Error,Warning
|
||||||
|
}
|
||||||
if ($issues) {
|
if ($issues) {
|
||||||
$issues | Format-Table -AutoSize
|
$issues | Format-Table -AutoSize
|
||||||
throw "PSScriptAnalyzer detected issues."
|
throw "PSScriptAnalyzer detected issues."
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ find aw-server proxmox -type f -name "*.sh" -print0 | xargs -0 -r -n1 bash -n
|
|||||||
|
|
||||||
echo "[2/3] Shellcheck (if available)"
|
echo "[2/3] Shellcheck (if available)"
|
||||||
if command -v shellcheck >/dev/null 2>&1; then
|
if command -v shellcheck >/dev/null 2>&1; then
|
||||||
find aw-server proxmox -type f -name "*.sh" -print0 | xargs -0 -r shellcheck
|
find aw-server proxmox -type f -name "*.sh" -print0 | xargs -0 -r shellcheck -e SC1007,SC1090,SC2016
|
||||||
else
|
else
|
||||||
echo "shellcheck not found, skipping."
|
echo "shellcheck not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user