Repository navigation
Add mcpprobe.json lint config and ignore rules - #21
Merged
Merged
Conversation
lint can now read a committed mcpprobe.json (failOn, strict, nested, minDescriptionLength, minDescriptionWords, rules, ignore). The nearest file is used, walking up from the working directory to the repository root. --config picks a file and --no-config skips the search. Flags override the file, and --rule merges per rule id. Without a file nothing changes. ignore entries hide findings by rule, tool pattern and parameter pattern. Hidden findings never fail the run, and entries that matched nothing are listed in the report. The same suppressions are available to library users through LintOptions.Suppressions, LintReport.SuppressedFindings and LintReport.UnusedSuppressions. The Action and the Azure template get a config input, and their fail-on default is now empty so it does not override failOn from the file.
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 read a committed mcpprobe.json for failOn, strict, nested, description limits, per-rule severity, and ignore entries. It uses the nearest file, starting in the current directory and going up to the repository root. --config and --no-config override that, and flags you type win over the file (--rule merges per id).
ignore entries hide findings by rule, tool pattern, and parameter pattern. Hidden findings never fail the run. The report prints Hidden: N ignored. and lists unused entries (info only).
With no file and no new flags, stdout, stderr, and exit codes are unchanged from 0.4.0-preview.
The file holds lint settings only. It cannot name a server to start. snapshot and diff do not read it. Library users get LintSuppression and LintOptions.Suppressions; the library does not read the file.
The GitHub Action and Azure template gain a config input. fail-on / failOn now default to empty so a file failOn is not overridden. With no file the CLI default is still warning.
Schema: docs/mcpprobe.schema.json. A later baseline file is not in this PR; a config that already has a baseline key will be rejected until that lands.