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

NameSignatureSynopsis
Operations
PrefixPrefix No description available.
allowanceOfallowanceOf directiveWhat an AXG001 allowance stands for, from its trailing (gap: name) or (why: text).
numericSpellingnumericSpelling directiveThe old numeric spelling of a directive or note (AXG001), when it uses one.
allDirectivesallDirectives sourceTextNo description available.
allNotesallNotes sourceTextNotes acknowledge guide findings, never suppress them.
guideMessageguideMessage config ctx messageNo description available.
validDirectivesvalidDirectives sourceTextNo description available.
claimRuleIdsclaimRuleIds The rules whose allowances cover one call and must name a gap or a why: raw effects and raw concurrency.
isAllowedisAllowed sourceText line1 ruleIdTrue 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

Prefix

Prefix
Member

Returns

string
kind:member

allowanceOf

allowanceOf directive
Member
What an AXG001 allowance stands for, from its trailing `(gap: name)` or `(why: text)`.

Parameters

NameTypeDescription
directiveDirective

Returns

Allowed option
kind:member

numericSpelling

numericSpelling directive
Member
The old numeric spelling of a directive or note (`AXG001`), when it uses one.

Parameters

NameTypeDescription
directiveDirective

Returns

string option
kind:member

allDirectives

allDirectives sourceText
Member

Parameters

NameTypeDescription
sourceTextISourceText

Returns

Directive list
kind:member

allNotes

allNotes sourceText
Member
Notes acknowledge guide findings, never suppress them. Reuse the ordinary-comment lexer so quoted documentation and string contents cannot acknowledge a finding.

Parameters

NameTypeDescription
sourceTextISourceText

Returns

Directive list
kind:member

guideMessage

guideMessage config ctx message
Member

Parameters

NameTypeDescription
configConfig
ctxCliContext
messageMessage

Returns

Message
kind:member

validDirectives

validDirectives sourceText
Member

Parameters

NameTypeDescription
sourceTextISourceText

Returns

Directive list
kind:member

claimRuleIds

claimRuleIds
Member
The rules whose allowances cover one call and must name a gap or a why: raw effects and raw concurrency.

Returns

Set<string>
kind:member

isAllowed

isAllowed sourceText line1 ruleId
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

NameTypeDescription
sourceTextISourceText
line1int
ruleIdstring

Returns

bool