GuardrailConfigModule

PackageAxial.Guardrails
Which guardrails run, the capabilities and the files that claim them, and the checked-in violation baseline. `build/Axial.Guardrails.targets` writes the resolved MSBuild items to a tab-separated config file: guardrail <name> capabilityDefinition <absolute path of a .capability.toml file> capabilityFile <capability name> <absolute file path> (from `AxialCapability` metadata on a Compile item) generated <absolute file path> (a compile item under the project's intermediate output directory) baseline <rule id> <repository-relative file> <fingerprint>[ x<count>] setting baselineRoot|baselineOutput|nativeAot|checkpoint|severityCap <value> rule <id> <guardrail> <match> <scope> <message> <replacement>

Summary

NameSignatureSynopsis
Operations
EnvironmentVariableEnvironmentVariable No description available.
defaultsdefaults No description available.
parseparse linesNo description available.
rejectRemovedSeverityrejectRemovedSeverity ()Fail closed even in standalone hosts and on repeated loads; stderr alone cannot fail an analyzer host.
loadload ()No description available.
fingerprintfingerprint sourceText messageNo description available.
relativeFilerelativeFile config fileNameNo description available.
sourceClassificationsourceClassification config fileNameClassify a compiler source against the configured policy root.
isGeneratedSourceisGeneratedSource config fileNameWhether the build declared this source as generated (see GeneratedFiles).
ExcludedGeneratedStatusExcludedGeneratedStatus Coverage status of a source the build declared as generated; it counts as complete coverage.
isSkippedSourceisSkippedSource config fileNameNo description available.
resolvedFilePolicyresolvedFilePolicy config fileNameApplies the enabled guardrail and legacy baseline policy.
resolvedPolicyresolvedPolicy config ctxNo description available.
ConcurrencyCapabilityConcurrencyCapability The built-in capability a file claims when its job is raw concurrency: Flow's own runtime, or an OS bridge.
claimsConcurrencyclaimsConcurrency config fileNameWhether the file claims the concurrency capability (AxialCapability="concurrency" on its Compile item).
exemptsRawConcurrencyexemptsRawConcurrency config fileNameRaw-concurrency exemptions do not require typed facts; Fast and Full share them.
usesTestAnalyzerSetusesTestAnalyzerSet configNo description available.
analyzersanalyzers The single registry of CLI analyzers.
reportsInTestSetreportsInTestSet codeWhether a code is reported in a test project that uses the reduced analyzer set.
shouldRunAnalyzershouldRunAnalyzer config ruleSelection happens before a rule touches symbols or typed trees; AXG002 still validates directives.
runsInProjectrunsInProject config codeWhether a project reports a code: all codes outside the reduced test set, otherwise only the test set's.
skipReasonskipReason config fileNameWhy a repository source cannot be checked as configured, as a sentence for warning AXGINF002, if it cannot.
applyWithapplyWith config guardrail ctx messagesNo description available.
capSeveritycapSeverity config messagesFast never reports a finding as an Error, so the capped fallback turns Error findings into warnings.
applyapply guardrail ctx messagesNo description available.
applyCoreapplyCore ctx messagesNo description available.

Operations

kind:member

EnvironmentVariable

EnvironmentVariable
Member

Returns

string
kind:member

defaults

defaults
Member

Returns

Config
kind:member

parse

parse lines
Member

Parameters

NameTypeDescription
linesstring seq

Returns

Config
kind:member

rejectRemovedSeverity

rejectRemovedSeverity ()
Member
Fail closed even in standalone hosts and on repeated loads; stderr alone cannot fail an analyzer host.

Parameters

NameTypeDescription
unit

Returns

unit
kind:member

load

load ()
Member

Parameters

NameTypeDescription
unit

Returns

Config
kind:member

fingerprint

fingerprint sourceText message
Member

Parameters

NameTypeDescription
sourceTextISourceText
messageMessage

Returns

string
kind:member

relativeFile

relativeFile config fileName
Member

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

string
kind:member

sourceClassification

sourceClassification config fileName
Member
Classify a compiler source against the configured policy root. With no policy root the standalone analyzer behavior is unchanged.

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

SourceClassification option
kind:member

isGeneratedSource

isGeneratedSource config fileName
Member
Whether the build declared this source as generated (see `GeneratedFiles`).

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

bool
kind:member

ExcludedGeneratedStatus

ExcludedGeneratedStatus
Member
Coverage status of a source the build declared as generated; it counts as complete coverage.

Returns

string
kind:member

isSkippedSource

isSkippedSource config fileName
Member

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

bool
kind:member

resolvedFilePolicy

resolvedFilePolicy config fileName
Member
Applies the enabled guardrail and legacy baseline policy. Tiered findings and note validation retain their resolved severity and never generate baseline entries.

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

ResolvedFile option
kind:member

resolvedPolicy

resolvedPolicy config ctx
Member

Parameters

NameTypeDescription
configConfig
ctxCliContext

Returns

ResolvedFile option
kind:member

ConcurrencyCapability

ConcurrencyCapability
Member
The built-in capability a file claims when its job is raw concurrency: Flow's own runtime, or an OS bridge.

Returns

string
kind:member

claimsConcurrency

claimsConcurrency config fileName
Member
Whether the file claims the concurrency capability (`AxialCapability="concurrency"` on its Compile item). Such a file implements Flow-level concurrency on raw tasks, so AXG009, AXG012 and AXG014 do not apply to it.

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

bool
kind:member

exemptsRawConcurrency

exemptsRawConcurrency config fileName
Member
Raw-concurrency exemptions do not require typed facts; Fast and Full share them. A per-call AXG009 allowance is checked where each finding is reported.

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

bool
kind:member

usesTestAnalyzerSet

usesTestAnalyzerSet config
Member

Parameters

NameTypeDescription
configConfig

Returns

bool
kind:member

analyzers

analyzers
Member
The single registry of CLI analyzers. A tracked name missing here fails closed instead of being skipped.

Returns

AnalyzerEntry list
kind:member

reportsInTestSet

reportsInTestSet code
Member
Whether a code is reported in a test project that uses the reduced analyzer set.

Parameters

NameTypeDescription
codestring

Returns

bool
kind:member

shouldRunAnalyzer

shouldRunAnalyzer config rule
Member
Selection happens before a rule touches symbols or typed trees; AXG002 still validates directives. An unregistered analyzer runs wherever no selection is made (non-test roles, InTests=all); only the reduced test set needs its codes, so there it fails closed instead of being silently skipped or run.

Parameters

NameTypeDescription
configConfig
rulestring

Returns

Result<bool, string>
kind:member

runsInProject

runsInProject config code
Member
Whether a project reports a code: all codes outside the reduced test set, otherwise only the test set's.

Parameters

NameTypeDescription
configConfig
codestring

Returns

bool
kind:member

skipReason

skipReason config fileName
Member
Why a repository source cannot be checked as configured, as a sentence for warning AXGINF002, if it cannot. Hosts record this in their build report so every build, including cache replays and reused build nodes, shows it. An unusable source path means no rule checked the file; an unusable project path means the file was analyzed under the default policy instead of its project's role. An external source is out of scope, not skipped.

Parameters

NameTypeDescription
configConfig
fileNamestring

Returns

string option
kind:member

applyWith

applyWith config guardrail ctx messages
Member

Parameters

NameTypeDescription
configConfig
guardrailstring
ctxCliContext
messagesMessage list

Returns

Message list
kind:member

capSeverity

capSeverity config messages
Member
Fast never reports a finding as an Error, so the capped fallback turns Error findings into warnings.

Parameters

NameTypeDescription
configConfig
messagesMessage list

Returns

Message list
kind:member

apply

apply guardrail ctx messages
Member

Parameters

NameTypeDescription
guardrailstring
ctxCliContext
messagesMessage list

Returns

Message list
kind:member

applyCore

applyCore ctx messages
Member

Parameters

NameTypeDescription
ctxCliContext
messagesMessage list

Returns

Message list