feat: add PSScriptAnalyzer linter aspect#850
Open
kain88-de wants to merge 3 commits into
Open
Conversation
Adds PSScriptAnalyzer as a bring-your-own linter following the yamllint/ rubocop pattern. Includes the Bazel aspect, a PowerShell wrapper script that produces both human-readable and SARIF output in a single pwsh invocation, and a working example workspace under examples/powershell/.
|
CheckmkCI
pushed a commit
to Checkmk/checkmk
that referenced
this pull request
Jun 3, 2026
Hermetic Bazel lint aspect for .ps1 / .psm1 files using PSScriptAnalyzer. Vendors the stalled upstream aspect-build/rules_lint#850 into bazel/tools/ so the migration when upstream merges is a load() path swap plus deletion of two files; the rest of the wiring (module extension, settings file, aspect registration, filegroup tags) stays. Pwsh, PSScriptAnalyzer, and ConvertToSARIF are pulled as hermetic http_archives via a module extension. Settings start with severity = Error only; widening to Warning/Information is a follow-up once the existing PowerShell code is clean at the Error level. Opt-in by filegroup tag (lint-with-psscriptanalyzer) — there is no native ps1_library rule kind. agents/windows/plugins and the relay windows-installer scripts are tagged in this commit; remaining filegroups under cmk/plugins/*/agents/ and agents/wnx/ will be tagged incrementally. Change-Id: I580f923216bfb94dd43bff68e1bb0665db0b037e JIRA-Ref: CMK-34289
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds PSScriptAnalyzer as a bring-your-own linter following the yamllint/ rubocop pattern. Includes the Bazel aspect, a PowerShell wrapper script that produces both human-readable and SARIF output in a single pwsh invocation, and a working example workspace under examples/powershell/.
Changes are visible to end-users: yes
Test plan