critic-fix(validation): make rules immutable
This commit is contained in:
parent
66de760ff2
commit
e26c0917d4
@ -55,3 +55,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
and install Linux Swift toolchain prerequisites for the WASM CI job.
|
||||
- Harden duplicate-key validation to use set membership while preserving exact
|
||||
diagnostics.
|
||||
- Make validation rules immutable after construction.
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
public extension PureYAML.Validation {
|
||||
/// A validation rule that can report zero or more path-aware issues.
|
||||
struct Rule: Sendable {
|
||||
public var description: String
|
||||
public var predicate: @Sendable (Context) -> Bool
|
||||
public var check: @Sendable (Context) -> [Issue]
|
||||
public let description: String
|
||||
public let predicate: @Sendable (Context) -> Bool
|
||||
public let check: @Sendable (Context) -> [Issue]
|
||||
|
||||
public init(
|
||||
description: String,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user