Even though Sublime text 3 have linter plugins for most languages, I couldn’t find one for powershell, so I made SublimeLinter-contrib-Powershell.
With help of SublimeLinter I integrated PSScriptAnalyzer in Sublime Text 3.
Besides standard linting, the linter is also able to perform the following compatibility checks against different powershell versions and environments.
- Identify syntax elements that are incompatible with targeted PowerShell versions.
- Flag cmdlets that are not available in a given Edition/Version of PowerShell on a given Operating System.
- Identify types that are not available (loaded by default) in targeted PowerShell platforms.
For a subset of the rules included (mostly compatibility checks) It will also show suggestions.
Advanced configuration of the linter is possible with help of a PSScriptAnalyzerSettings file.
All the heavy lifting is done by SublimeLinter, so a shout-out to those guys for making it so easy to create new linters for S3.
https://github.com/SublimeLinter/SublimeLinter
And obviously, also to the guys behind PSScriptAnalyzer for a great powershell linter.
https://www.powershellgallery.com/packages/PSScriptAnalyzer