Skip to content

Commit f015f86

Browse files
Improve metadata validation and remove exception cases
Updates to the normalize proposals in the swift-evolution repository allow exceptions to removed and validation to improved. - Validate that github profile links use https scheme - Remove exception for profile using Previous Proposals incorrectly - Remove exceptions for recent proposals missing Review header fields - Update test snapshots with updated proposals and expected results
1 parent 6730be8 commit f015f86

File tree

96 files changed

+2902
-2898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2902
-2898
lines changed

Sources/EvolutionMetadataExtraction/Extractors/FieldExtractors/PersonExtractor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct PersonExtractor: MarkupWalker {
3030
case reviewManager
3131
}
3232

33-
private var role: Role = .author
33+
private var role: Role
3434

3535
private var warnings: [Proposal.Issue] = []
3636
private var errors: [Proposal.Issue] = []

Sources/EvolutionMetadataExtraction/Extractors/ProposalMetadataExtractor.swift

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ struct ProposalMetadataExtractor {
6868
}
6969

7070
proposal.upcomingFeatureFlag = extractValue(from: headerFieldsByLabel, with: UpcomingFeatureFlagExtractor.self)
71-
72-
// Known issue with SE-0255, should be resolved by https://github.com/apple/swift-evolution/pull/2411
73-
if proposalSpec.id != "SE-0255" {
74-
proposal.previousProposalIDs = extractValue(from: headerFieldsByLabel, with: PreviousProposalExtractor.self)
75-
}
71+
proposal.previousProposalIDs = extractValue(from: headerFieldsByLabel, with: PreviousProposalExtractor.self)
7672
proposal.trackingBugs = extractValue(from: headerFieldsByLabel, with: TrackingBugExtractor.self)
7773
proposal.implementation = extractValue(from: headerFieldsByLabel, with: ImplementationExtractor.self)
7874

@@ -163,11 +159,8 @@ struct LinkInfo {
163159
self.destination = destination
164160
}
165161

166-
// VALIDATION ENHANCEMENT: Consider requiring https//github.com style links for consistency
167162
var gitHubDestination: String? {
168-
if destination.starts(with: /https?:\/\/github.com/) ||
169-
destination.hasPrefix("//github.com") // protocol-relative URI
170-
{
163+
if destination.starts(with: "https://github.com") {
171164
return destination
172165
} else {
173166
return nil

0 commit comments

Comments
 (0)