Skip to content

Commit 3877fa6

Browse files
committed
Initial commit: RFC 5322 implementation
1 parent 635dd78 commit 3877fa6

31 files changed

+456
-389
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ Thumbs.db
2323
!CODE_OF_CONDUCT.md
2424
!SECURITY.md
2525
!**/*.docc/**/*.md
26+
27+
28+
# SwiftLint Remote Config Cache
29+
.swiftlint/RemoteConfigCache

.swift-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"rules": {
2020
"AllPublicDeclarationsHaveDocumentation": false,
21-
"AlwaysUseLowerCamelCase": true,
21+
"AlwaysUseLowerCamelCase": false,
2222
"AmbiguousTrailingClosureOverload": true,
2323
"BeginDocumentationCommentWithOneLineSummary": false,
2424
"DoNotUseSemicolons": true,

.swiftlint.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33

44
parent_config: https://raw.githubusercontent.com/swift-standards/swift-standards/main/.swiftlint.yml
55

6-
# Package-specific overrides (if needed)
7-
# Add any swift-rfc-5322 specific rules here
6+
# Package-specific overrides
7+
# These rules are disabled due to the nature of RFC parsing code
8+
disabled_rules:
9+
- cyclomatic_complexity
10+
- function_body_length

Package.swift

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ extension Target.Dependency {
1313
static var rfc1123: Self { .product(name: "RFC 1123", package: "swift-rfc-1123") }
1414
static var standards: Self { .product(name: "Standards", package: "swift-standards") }
1515
static var time: Self { .product(name: "StandardTime", package: "swift-standards") }
16-
static var incits_4_1986: Self { .product(name: "INCITS 4 1986", package: "swift-incits-4-1986") }
17-
static var standardsTestSupport: Self { .product(name: "StandardsTestSupport", package: "swift-standards") }
16+
static var incits_4_1986: Self {
17+
.product(name: "INCITS 4 1986", package: "swift-incits-4-1986")
18+
}
19+
static var standardsTestSupport: Self {
20+
.product(name: "StandardsTestSupport", package: "swift-standards")
21+
}
1822
}
1923

2024
let package = Package(
@@ -23,16 +27,16 @@ let package = Package(
2327
.macOS(.v15),
2428
.iOS(.v18),
2529
.tvOS(.v18),
26-
.watchOS(.v11)
30+
.watchOS(.v11),
2731
],
2832
products: [
2933
.library(name: .rfc5322, targets: [.rfc5322]),
3034
.library(name: .rfc5322Foundation, targets: [.rfc5322Foundation]),
3135
],
3236
dependencies: [
33-
.package(url: "https://github.com/swift-standards/swift-rfc-1123.git", from: "0.0.1"),
34-
.package(url: "https://github.com/swift-standards/swift-standards.git", from: "0.0.1"),
35-
.package(url: "https://github.com/swift-standards/swift-incits-4-1986.git", from: "0.0.1")
37+
.package(url: "https://github.com/swift-standards/swift-rfc-1123.git", from: "0.3.1"),
38+
.package(url: "https://github.com/swift-standards/swift-standards.git", from: "0.4.0"),
39+
.package(url: "https://github.com/swift-standards/swift-incits-4-1986.git", from: "0.4.0"),
3640
],
3741
targets: [
3842
.target(
@@ -41,7 +45,7 @@ let package = Package(
4145
.standards,
4246
.time,
4347
.rfc1123,
44-
.incits_4_1986
48+
.incits_4_1986,
4549
]
4650
),
4751
.target(
@@ -56,15 +60,15 @@ let package = Package(
5660
.rfc5322,
5761
.time,
5862
.incits_4_1986,
59-
.standardsTestSupport
63+
.standardsTestSupport,
6064
]
6165
),
6266
.testTarget(
6367
name: .rfc5322Foundation.tests,
6468
dependencies: [
6569
.rfc5322,
6670
.rfc5322Foundation,
67-
.time
71+
.time,
6872
]
6973
),
7074
],
@@ -78,9 +82,10 @@ extension String {
7882

7983
for target in package.targets where ![.system, .binary, .plugin].contains(target.type) {
8084
let existing = target.swiftSettings ?? []
81-
target.swiftSettings = existing + [
82-
.enableUpcomingFeature("ExistentialAny"),
83-
.enableUpcomingFeature("InternalImportsByDefault"),
84-
.enableUpcomingFeature("MemberImportVisibility")
85-
]
85+
target.swiftSettings =
86+
existing + [
87+
.enableUpcomingFeature("ExistentialAny"),
88+
.enableUpcomingFeature("InternalImportsByDefault"),
89+
.enableUpcomingFeature("MemberImportVisibility"),
90+
]
8691
}

0 commit comments

Comments
 (0)