SuppressionsModule
PackageAxial.Guardrails
Parses rule-specific Axial.Guardrails suppression comments.
Only ordinary F# line comments are directives:
// axial-allow-raise-in-flow: foreign callback translates this exception
A directive names its rule by name (`RuleNames`); the old numeric spelling (`axial-allow-raise-in-flow`) is rejected with
the name to use. XML documentation (`///`), block comments, and string contents are not directives. The file-wide form
`axial-allow-file-<rule>` must occur in the leading ordinary-comment block. Every directive is recorded in the
policy lock, so each new one is a review item.
raw-effect (AXG001) and raw-concurrency (AXG009) are special: raw effects and raw concurrency belong in files that claim a capability, so their
allowances are rare and are highlighted in policy review. One covers one call, never a file, and ends with the gap
in Axial or a capability it stands for, or with why the call is deliberate:
// axial-allow-raw-effect: Axial.Process has no named pipes yet (gap: process-named-pipes)
// axial-allow-raw-effect: (why: this test checks the analyzer reports a real Random)
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Operations | ||
| Prefix | Prefix | No description available. |
| allowanceOf | allowanceOf directive | What an AXG001 allowance stands for, from its trailing (gap: name) or (why: text). |
| numericSpelling | numericSpelling directive | The old numeric spelling of a directive or note (AXG001), when it uses one. |
| allDirectives | allDirectives sourceText | No description available. |
| allNotes | allNotes sourceText | Notes acknowledge guide findings, never suppress them. |
| guideMessage | guideMessage config ctx message | No description available. |
| validDirectives | validDirectives sourceText | No description available. |
| claimRuleIds | claimRuleIds | The rules whose allowances cover one call and must name a gap or a why: raw effects and raw concurrency. |
| isAllowed | isAllowed sourceText line1 ruleId | True when a valid suppression for ruleId (AXG001) sits on the finding line, the line above it, or (except for AXG001 and AXG009) in the file's leading comment block. |
Operations
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
True when a valid suppression for `ruleId` (AXG001) sits on the finding line, the line above it, or (except for AXG001
and AXG009) in the file's leading comment block. An AXG001 or AXG009 allowance counts only when it names its gap or why.
Parameters
| Name | Type | Description |
|---|---|---|
| sourceText | ISourceText | |
| line1 | int | |
| ruleId | string |
Returns
bool

