CoverageProfileStringDelimiterZ
constCoverageProfileStringDelimiterZ:ZodObject<{close:ZodOptional<ZodString>;escape:ZodOptional<ZodUnion<readonly [ZodString,ZodNull]>>;open:ZodString; },$strip>
Defined in: types/src/config.ts:38
Config-facing shape for a custom assertion-coverage profile
(verification.coverageProfiles, phase 167 T7). Mirrors
@thomas-powers-jr/cadence-core’s LanguageProfile
(packages/core/src/verify/coverage-profiles/types.ts) as a
JSON-serializable, string-pattern shape: openerPattern/assertionPattern
are regex SOURCE STRINGS here, compiled into real RegExps at
config-load time by core’s compileCustomProfile
(packages/core/src/verify/coverage-profiles/custom.ts) — never by this
schema — since a native RegExp cannot round-trip through
.cadence/config.json. This package has no dependency on core (pure data
layer), so strategy below is a hand-kept mirror of core’s BlockStrategy
union, not an import; core’s compileCustomProfile is the single bridge
between this JSON shape and the runtime LanguageProfile.
Deliberately narrower than the full LanguageProfile surface — two field
groups are scoped OUT of config entirely for this task (see
custom.ts’s module docstring for the full rationale, repeated in brief
here since this is the schema an operator actually reads):
openerRequiredLiteral: an advanced, easy-to-misuse field whose own docstring (LanguageProfile.openerRequiredLiteral) requiresopenerPatternto end at one exact position (immediately after the triggering() for its paren-depth-aware extraction to be safe at all — go’s own module docstring documents three real false-positive bugs this field’s misuse can reintroduce. Built-in profiles that don’t need it (php’s PHPUnit opener, python, most shapes) prove a custom profile can be fully functional without it.fencedStrings/heredocs: advanced dynamic-fence string forms (Rust’sr#"..."#, PHP’s heredoc/nowdoc) needed by only one or two built-ins each. Plainstrings(fixed open/close delimiters) plus line/blockcommentscover ordinary language grammars, including the Ruby do-end-keyword fixture this task ships end-to-end.