Skip to content

Commit

Permalink
use the convenient computed property `isAllowedInSemanticVersionIdent…
Browse files Browse the repository at this point in the history
…ifier` when validating build metadata

Co-authored-by: David Rönnqvist <david.ronnqvist@gmail.com>
  • Loading branch information
WowbaggersLiquidLunch and d-ronnqvist authored May 27, 2022
1 parent 83b2a56 commit 5afa8f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extension SymbolGraph {
throw SymbolGraph.SemanticVersionError.emptyIdentifier(position: .buildMetadata)
}
try buildMetadataIdentifiers.forEach {
guard $0.allSatisfy( { $0.isASCII && ( $0.isLetter || $0.isNumber || $0 == "-" ) } ) else {
guard $0.allSatisfy( { $0.isAllowedInSemanticVersionIdentifier } ) else {
throw SymbolGraph.SemanticVersionError.invalidCharacterInIdentifier($0, position: .buildMetadata)
}
}
Expand Down

0 comments on commit 5afa8f1

Please sign in to comment.