feat(engine): add inline suppression via archgate-ignore comments#383
Merged
Conversation
Add engine-level inline suppression so developers can suppress individual rule violations in source code without modifying the rule itself. Syntax: // archgate-ignore ADR-ID/rule-id reason text // archgate-ignore-file ADR-ID/rule-id reason text Key behaviors: - Next-line scope: suppresses the violation on the immediately following line - File-level scope: suppresses all matching violations anywhere in the file - Reason is required — missing reason ignores the suppression and emits a warning - Stacked comments: consecutive suppression comments all target the first non-suppression line, so multiple rules can be suppressed on one line - Unused suppressions produce warnings to prevent stale exceptions - Markdown code block awareness: examples in .md/.mdx docs are not parsed - Supports both // and # comment styles (TS, YAML, Python, shell, etc.) New files: - src/engine/suppressions.ts — parsing + filtering logic - tests/engine/suppressions.test.ts — 27 tests Modified: - runner.ts — integrates suppression post-processing after rule execution - reporter.ts — displays suppressed count and suppression warnings - context.ts — extends EMPTY_SUMMARY with new fields Docs: - Added "Opt-out directives" section to writing-rules guide (EN, pt-BR, nb) - Added "Inline suppression" section to rule-api reference (EN, pt-BR, nb) - Regenerated llms-full.txt Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Deploying archgate-cli with
|
| Latest commit: |
4441795
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e1f36086.archgate-cli.pages.dev |
| Branch Preview URL: | https://claude-hardcore-bassi-af1f98.archgate-cli.pages.dev |
Contributor
Code Coverage
Full HTML report available in workflow artifacts. Per-directory breakdown
|
Merged
rhuanbarreto
pushed a commit
that referenced
this pull request
May 30, 2026
# archgate ## [0.42.0](v0.41.1...v0.42.0) (2026-05-30) ### Features * **engine:** add inline suppression via archgate-ignore comments ([#383](#383)) ([1240860](1240860)) ### Bug Fixes * **deps:** resolve dependency dashboard deprecation and lookup warnings ([#387](#387)) ([18eae44](18eae44)), closes [#107](#107) * **docs:** restore Norwegian Bokmål diacritical marks across nb/ locale ([#384](#384)) ([ef98b39](ef98b39)) * **shims,docs:** resolve CodeQL and AI code quality findings ([#388](#388)) ([63ec93f](63ec93f)) --- This PR was generated with [simple-release](https://github.com/TrigenSoftware/simple-release). <details> <summary>📄 Cheatsheet</summary> <br> You can configure the bot's behavior through a pull request comment using the `!simple-release/set-options` command. ### Command Format ````md !simple-release/set-options ```json { "bump": {}, "publish": {} } ``` ```` ### Useful Parameters #### Bump | Parameter | Type | Description | |-----------|------|-------------| | `version` | `string` | Force set specific version | | `as` | `'major' \| 'minor' \| 'patch' \| 'prerelease'` | Release type | | `prerelease` | `string` | Pre-release identifier (e.g., "alpha", "beta") | | `firstRelease` | `boolean` | Whether this is the first release | | `skip` | `boolean` | Skip version bump | | `byProject` | `Record<string, object>` | Per-project bump options for monorepos | #### Publish | Parameter | Type | Description | |-----------|------|-------------| | `skip` | `boolean` | Skip publishing | | `access` | `'public' \| 'restricted'` | Package access level | | `tag` | `string` | Tag for npm publication | ### Usage Examples #### Force specific version ````md !simple-release/set-options ```json { "bump": { "version": "2.0.0" } } ``` ```` #### Force major bump ````md !simple-release/set-options ```json { "bump": { "as": "major" } } ``` ```` #### Create alpha pre-release ````md !simple-release/set-options ```json { "bump": { "prerelease": "alpha" } } ``` ```` #### Publish with specific access and tag ````md !simple-release/set-options ```json { "bump": { "prerelease": "beta" }, "publish": { "access": "public", "tag": "beta" } } ``` ```` ### Access Restrictions The command can only be used by users with permissions: - repository owner - organization member - collaborator ### Notes - The last comment with `!simple-release/set-options` command takes priority - JSON must be valid, otherwise the command will be ignored - Parameters apply only to the current release execution - The command can be updated by editing the comment or adding a new one </details> <!-- Please do not edit this comment. simple-release-pull-request: true simple-release-branch-from: release simple-release-branch-to: main --> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Merged
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.
Summary
archgate-ignoreinline comments that suppress individual rule violations in source code, without modifying the rule itselfSyntax
Key behaviors
archgate-ignore-filesuppresses all matching violations anywhere in the file.md/.mdxfiles are not parsed as real suppressions//and#(TypeScript, YAML, Python, shell, etc.)Changed files
src/engine/suppressions.tssrc/engine/runner.tssrc/engine/reporter.tssrc/engine/context.tsEMPTY_SUMMARYwithsuppressedandsuppressionWarningstests/engine/suppressions.test.tstests/engine/runner.test.tstests/engine/reporter.test.tsbuildSummarysuppression fieldstests/commands/check-action.test.tsdocs/**/writing-rules.mdxdocs/**/rule-api.mdxdocs/public/llms-full.txtTest plan
bun run validatepasses (lint, typecheck, format, 1250 tests, 39/39 ADR rules)