feat: implement Soroban Rule Suppression Framework (#476)#562
Open
zoffunjunior381-jpg wants to merge 1 commit into
Open
feat: implement Soroban Rule Suppression Framework (#476)#562zoffunjunior381-jpg wants to merge 1 commit into
zoffunjunior381-jpg wants to merge 1 commit into
Conversation
Closes MDTechLabs#476 Closes MDTechLabs#477 Closes MDTechLabs#478 - MDTechLabs#476: Implement Soroban Rule Suppression Framework src/suppressions/stellar/ RuleSuppressionFramework allows developers to suppress specific rule findings via two mechanisms: 1. Inline annotations: // gasguard-suppress: GG001 -- reason here Parsed from source text with parseInlineSuppressions(); matched to findings on the same or immediately preceding line in the same file. 2. Config suppressions: registered via addConfigSuppression() with a scope of 'global' or a file glob (supports * and ** patterns). filter() returns { active, suppressed } — suppressed findings carry a SuppressionRecord including the matched suppression and reason. Optionally fires warnOnSuppression and an onSuppressed callback for audit trails in CI pipelines.
|
@zoffunjunior381-jpg Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #476
Closes #477
Closes #478
Summary
Adds a
RuleSuppressionFrameworkclass atsrc/suppressions/stellar/that lets developers suppress specific rule findings both inline and via configuration.#476 — Implement Soroban Rule Suppression Framework
Path:
src/suppressions/stellar/Files:
types.ts—InlineSuppression,ConfigSuppression,Finding,SuppressionRecord,SuppressionFilterResult, and config typesrule-suppression-framework.ts—RuleSuppressionFrameworkclass +parseInlineSuppressionshelperindex.ts— barrel exportInline suppressions — parsed from source annotations:
// gasguard-suppress: GG001 -- acceptable in single-owner contractMulti-rule syntax also supported:
// gasguard-suppress: GG001,GG002 -- reasonConfig suppressions — registered programmatically:
Scope supports
'global'and file globs (*and**).Filtering:
Optional
warnOnSuppression: trueandonSuppressedcallback for CI audit trails.