StefanScherer / packer-windows

Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
MIT License
1.29k stars 434 forks source link

Add PsScriptAnalyzer #290

Closed floh96 closed 3 years ago

floh96 commented 3 years ago

Follow up for #110. Added PsScriptAnalyzer and fixed all warnings or excluded the rule see PSScriptAnalyzerSettings.psd1. PSAvoidGlobalVars could also be ignored at function level in win-updates.ps1 if you like. Also formatted all powershell files. I made the changes a while back but never committed them. Tipp: select hide whitespace changes in review Warning: the changes are not tested (I did not build any vagrant boxes to validate)!

floh96 commented 3 years ago

~~I see AppVeyor is reporting some warnings, they were not reported locally for me.... Will fix them also.~~ Fixed

StefanScherer commented 3 years ago

Thanks you @floh96 to finish this. This is awesome! I‘ll take a closer look and then merge it.