PureXML/Sources/Validation
Mihaela Mihaljevic 36b2a73637
chore(concurrency): justify every @unchecked Sendable / nonisolated(unsafe) (#387)
The rules-swift concurrency rule's acceptance check requires every `@unchecked
Sendable` and `nonisolated(unsafe)` to carry an adjacent comment explaining why
the race is acceptable; an unjustified one is a violation. An audit found six
escape hatches whose comment explained the type but not the race:

- The four XPath `FunctionTable` statics (`CoreFunctions`, `StringFunctions`,
  `NodeFunctions`, `Evaluator.library`): each is an immutable, build-once lookup
  table never mutated after initialization, so concurrent reads race on nothing;
  `FunctionTable` is un-`Sendable` only because it stores closures.
- `Validation.Validator`: immutable after `init` (every stored validation list is
  a `let`); the erased `AnyValidation` closures are simply not provably `Sendable`.
- The test `ResultBox`: written once by the worker thread before its semaphore
  signals and read only after the wait, so the write happens-before the read.

Comments only; no behaviour change. `LoaderBox` and `ElementStorage` were already
justified. swiftformat/swiftlint --strict and the full suite stay green.
2026-06-29 15:12:02 +02:00
..
AttributeDeclaration.swift
AttributeDefault.swift
AttributeListParser.swift
AttributeType.swift
BuiltinValidation.swift
Conformance.swift
ContentModel.swift
ContentModelMatcher.swift
ContentModelParser.swift
DTDDeclarationValidity.swift
DTDDefaults.swift perf: make tree-to-tree transforms depth-safe (DTD defaults, canonicalization) (#352) 2026-06-26 19:27:37 +02:00
DTDSchema.swift
DTDStandaloneValidity.swift
DTDValidationHelpers.swift
DTDValidations.swift
HasWarnings.swift
HTMLValidations.swift
Occurrence.swift
Particle.swift
Schematron.swift
SchematronModel.swift
SchematronParser.swift
Severity.swift
StreamingDTDValidator.swift
StructuralValidations.swift
Validation.swift
ValidationCombinators.swift
ValidationCore.swift
ValidationOutcome.swift
Validator.swift chore(concurrency): justify every @unchecked Sendable / nonisolated(unsafe) (#387) 2026-06-29 15:12:02 +02:00