Repository navigation
Add lint baseline - #22
Merged
Merged
Conversation
mcpprobe lint --write-baseline <file> writes the current findings to a sorted lint baseline file and exits 0. lint --baseline <file>, or "baseline" in mcpprobe.json (relative to that file), hides those findings so only new ones fail. Entries are keyed by rule, tool and optional parameter, not by message, so a baseline survives wording changes. The report says "Hidden: N baselined." and lists entries that no longer match; they never fail the run. Library users get LintBaseline, LintBaselineEntry, LintOptions.Baseline, LintReport.BaselinedFindings and LintReport.StaleBaselineEntries. The Action gets a lint-baseline input and the Azure template a lintBaseline parameter, both passed as --baseline.
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.
lint can now accept the findings a server already has and fail only on new ones.
mcpprobe lint --write-baseline writes the current findings (sorted, no timestamps) and exits 0. lint --baseline , or "baseline" in mcpprobe.json (relative to that file, the flag wins), hides them. The report prints Hidden: N baselined. and lists entries that no longer match. Those are info only and never fail the run. Run --write-baseline again to refresh.
An entry is rule, tool and optional parameter, not the message, so a baseline survives wording changes. Rules that didn't run (like MCPP010 without --strict) are not called stale.
A missing, empty or bad baseline file, or both flags together, exits 2 before connecting. With no baseline, output is unchanged.
Library: LintBaseline, LintBaselineEntry, LintOptions.Baseline, LintReport.BaselinedFindings and StaleBaselineEntries. The Action gets a lint-baseline input and the Azure template a lintBaseline parameter, both passed as --baseline to lint only. There is no input to write one; do that locally and commit the file.